Last active
April 2, 2022 17:40
-
-
Save jtlapp/3b44de677f56f5dec299cdeefc9207db to your computer and use it in GitHub Desktop.
Type definition of ElectronMainApi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type PublicProperty<P> = P extends `_${string}` | |
? never | |
: (P extends `#${string}` ? never : P); | |
export type ElectronMainApi<T> = { | |
[K in PublicProperty<keyof T>]: (...args: any[]) => Promise<any>; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment