Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions screen-orientation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ By default, an iPad allows Multitasking and its orientation cannot be locked. If
* [`addListener('screenOrientationChange', ...)`](#addlistenerscreenorientationchange)
* [`removeAllListeners()`](#removealllisteners)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

</docgen-index>

Expand Down Expand Up @@ -135,9 +136,9 @@ Removes all listeners.

#### OrientationLockOptions

| Prop | Type |
| ----------------- | -------------------------------- |
| **`orientation`** | <code>OrientationLockType</code> |
| Prop | Type | Description |
| ----------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **`orientation`** | <code><a href="#orientationlocktype">OrientationLockType</a></code> | Note: Typescript v5.2+ users should import <a href="#orientationlocktype">OrientationLockType</a> from @capacitor/screen-orientation. |


#### PluginListenerHandle
Expand All @@ -146,4 +147,12 @@ Removes all listeners.
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |


### Type Aliases


#### OrientationLockType

<code>'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary'</code>

</docgen-api>
13 changes: 13 additions & 0 deletions screen-orientation/src/definitions.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
import type { PluginListenerHandle } from '@capacitor/core';

export interface OrientationLockOptions {
/**
* Note: Typescript v5.2+ users should import OrientationLockType from @capacitor/screen-orientation.
*/
orientation: OrientationLockType;
}

export type OrientationLockType =
| 'any'
| 'natural'
| 'landscape'
| 'portrait'
| 'portrait-primary'
| 'portrait-secondary'
| 'landscape-primary'
| 'landscape-secondary';

export interface ScreenOrientationResult {
type: OrientationType;
}
Expand Down