From f99228808e9e6070832ece148a6f232c0f577272 Mon Sep 17 00:00:00 2001 From: Shiva Prasad Date: Sun, 26 May 2024 13:23:32 +1200 Subject: [PATCH 1/2] Update designing-api.md Adds a missing typescript definition --- docs/plugins/tutorial/designing-api.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/tutorial/designing-api.md b/docs/plugins/tutorial/designing-api.md index 04b0651a3..27b4188cd 100644 --- a/docs/plugins/tutorial/designing-api.md +++ b/docs/plugins/tutorial/designing-api.md @@ -45,6 +45,8 @@ Populate `definitions.ts` with the following code: ```typescript import type { PluginListenerHandle } from '@capacitor/core'; +export declare type OrientationLockType = 'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary'; + export interface ScreenOrientationPlugin { /** * Returns the screen's current orientation. From dbe63c6b712818cfa038ae0700f4e3a8814746b8 Mon Sep 17 00:00:00 2001 From: Shiva Prasad Date: Sun, 26 May 2024 15:54:16 +1200 Subject: [PATCH 2/2] Update designing-api.md Removed the `& PluginListenerHandle` part as it no longer conforms to the latest capacitor core api. --- docs/plugins/tutorial/designing-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/tutorial/designing-api.md b/docs/plugins/tutorial/designing-api.md index 27b4188cd..30c3fb1b7 100644 --- a/docs/plugins/tutorial/designing-api.md +++ b/docs/plugins/tutorial/designing-api.md @@ -69,7 +69,7 @@ export interface ScreenOrientationPlugin { addListener( eventName: 'screenOrientationChange', listenerFunc: (orientation: { type: OrientationType }) => void, - ): Promise & PluginListenerHandle; + ): Promise; /** * Removes all listeners