UNPKG

react-qml

Version:
84 lines (83 loc) 2.84 kB
declare namespace Qml { type QmlEnum = string | number; interface QmlQt { application: { readonly state: number; readonly layoutDirection: number; readonly font: any; arguments: string[]; name: string; displayName: string; version: string; organization: string; domain: string; readonly supportsMultipleWindows: boolean; screens: any; aboutToQuit: QmlSignal; } & QmlElement; inputMethod: any; platform: { os: 'android' | 'ios' | 'tvos' | 'linux' | 'osx' | 'qnx' | 'unix' | 'windows' | 'winrt'; pluginName: string; }; isQtObject(obj: any): boolean; createComponent(source: string): QmlComponent; createQmlObject(qml: string, parent: QmlElement | null, filepath?: string): QmlElement; callLater(func: Function, ...args: any): void; } interface QmlObject { destroy: (delay?: number) => void; } type SignalHandler = () => any; interface QmlSignal { connect: (handler: SignalHandler) => void; disconnect: (handler: SignalHandler) => void; } interface QmlComponent { createObject(parent: QmlObject, props?: object): QmlObject; status: any; statusChanged: QmlSignal; errorString(): string; } type QmlProps = { [key: string]: any; }; type QmlFontProps = { pointSize?: number; pixelSize?: number; family?: string; weight?: any; bold?: boolean; italic?: boolean; underline?: boolean; overline?: boolean; strikeout?: boolean; capitalization?: any; letterSpacing?: number; wordSpacing?: number; kerning?: boolean; preferShaping?: boolean; hintingPreference?: any; }; type QmlQuickItem = { parent: QmlElement | null; left?: any; top?: any; right?: any; bottom?: any; horizontalCenter?: any; verticalCenter?: any; baseline?: any; }; type QmlElement = QmlObject & QmlProps; type QmlLocalStorageTransaction = { executeSql(statement: string, values?: Array<string>): any; }; type QmlLocalStorageOpenCallback = (db: QmlLocalStorage) => void; type QmlLocalStorageTransactionCallback = (tx: QmlLocalStorageTransaction) => void; type QmlLocalStorage = { openDatabaseSync(identifier: string, version: string, description: string, estimated_size?: number, callback?: QmlLocalStorageOpenCallback): QmlLocalStorage; transaction(callback: QmlLocalStorageTransactionCallback): void; readTransaction(callback: QmlLocalStorageTransactionCallback): void; }; }