From 1f57a359838901288bc2a816df015f38d273ce7c Mon Sep 17 00:00:00 2001 From: KonstantinKai Date: Fri, 12 Jan 2018 15:59:59 +0200 Subject: [PATCH 01/52] in progress --- types/expo/expo-tests.tsx | 81 ++++++- types/expo/index.d.ts | 499 ++++++++++++++++++++++++++++++++------ 2 files changed, 498 insertions(+), 82 deletions(-) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 386cb41b04..df401ae8e5 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -36,7 +36,7 @@ Amplitude.setUserProperties({key: 1}); Amplitude.clearUserProperties(); Amplitude.logEvent('name'); Amplitude.logEventWithProperties('event', {key: 'value'}); -Amplitude.setGroup('type', {key: 'value'}); +Amplitude.setGroup('type', ['value']); const asset = Asset.fromModule(1); asset.downloadAsync(); @@ -82,8 +82,83 @@ Audio.setAudioModeAsync({ allowsRecordingIOS: true }); Audio.setIsEnabledAsync(true); + +Audio.INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS === 0; +Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX === 1; +Audio.INTERRUPTION_MODE_IOS_DUCK_OTHERS === 2; + +Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX === 1; +Audio.INTERRUPTION_MODE_ANDROID_DUCK_OTHERS === 2; + +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT === 0; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP === 1; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4 === 2; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB === 3; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB === 4; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF === 5; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS === 6; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP === 7; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS === 8; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM === 9; + +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT === 0; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB === 1; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB === 2; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC === 3; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC === 4; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD === 5; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS === 6; + +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM === 'lpcm'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3 === 'ac-3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3 === 'cac3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4 === 'ima4'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC === 'aac '; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP === 'celp'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC === 'hvxc'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ === 'twvq'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3 === 'MAC3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6 === 'MAC6'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW === 'ulaw'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW === 'alaw'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN === 'QDMC'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2 === 'QDM2'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM === 'Qclp'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1 === '.mp1'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2 === '.mp2'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3 === '.mp3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS === 'alac'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE === 'aach'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD === 'aacl'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD === 'aace'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR === 'aacf'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2 === 'aacg'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2 === 'aacp'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL === 'aacs'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR === 'samr'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB === 'sawb'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE === 'AUDB'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC === 'ilbc'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA === 0x6d730011; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM === 0x6d730031; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3 === 'aes3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3 === 'ec-3'; + +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN === 0; +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW === 0x20; +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM === 0x40; +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH === 0x60; +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX === 0x7f; + +Audio.RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT === 0; +Audio.RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE === 1; +Audio.RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED === 2; +Audio.RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE === 3; + +Audio.RECORDING_OPTIONS_PRESET_HIGH_QUALITY; +Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY; async () => { - const result = await Audio.Sound.create('uri', { + const result = await Audio.Sound.create({uri: 'uri'}, { volume: 0.5, rate: 0.6 }, null, true); @@ -99,7 +174,7 @@ async () => { } const _status = await sound.getStatusAsync(); - await sound.loadAsync('uri'); + await sound.loadAsync({uri: 'uri'}); }; () => ( diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 89acb6ac10..0ec21968b2 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/expo/expo-sdk // Definitions by: Konstantin Kai // Martynas Kadiša +// Jan Aagaard // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -28,9 +29,7 @@ export type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0 export type BarCodeReadCallback = (params: { type: string; data: string; }) => void; export type Md5 = string; -/** - * Accelerometer - */ +/** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ export namespace Accelerometer { interface AccelerometerObject { x: Axis; @@ -38,27 +37,63 @@ export namespace Accelerometer { z: Axis; } + /** + * Subscribe for updates to the accelerometer. + * @param listener A callback that is invoked when an accelerometer update is available. When invoked, the listener is provided a single argumument that is an object containing keys x, y, z. + * @returns An EventSubscription object that you can call remove() on when you would like to unsubscribe the listener. + */ function addListener(listener: (obj: AccelerometerObject) => any): EventSubscription; + + /** Remove all listeners. */ function removeAllListeners(): void; + + /** + * Subscribe for updates to the accelerometer. + * @param intervalMs Desired interval in milliseconds between accelerometer updates. + */ function setUpdateInterval(intervalMs: number): void; } /** - * Amplitude + * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. + * + * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. */ export namespace Amplitude { + /** Initializes Amplitude with your Amplitude API key. */ function initialize(apiKey: string): void; + + /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ function setUserId(userId: string): void; + + /** Set properties for the current user. */ function setUserProperties(userProperties: HashMap): void; + + /** Clear properties set by `setUserProperties()`. */ function clearUserProperties(): void; + + /** Log an event to Amplitude. */ function logEvent(eventName: string): void; - function logEventWithProperties(eventName: string, properties: HashMap): void; - function setGroup(groupType: string, groupNames: HashMap): void; + + /** Log an event to Amplitude with custom properties. */ + function logEventWithProperties( + eventName: string, + + /** A map of custom properties. */ + properties: HashMap + ): void; + + /** Add the current user to a group. */ + function setGroup( + /** The group name, e.g. `'sports'`. */ + groupType: string, + + /** An array of group names, e.g. `['tennis', 'soccer']`. */ + groupNames: string[] + ): void; } -/** - * Asset - */ +/** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ export class Asset { constructor({ name, type, hash, uri, width, height }: { name: string; @@ -68,21 +103,40 @@ export class Asset { width?: number; height?: number; }); + + /** The MD5 hash of the asset’s data. */ + hash: Md5; + + /** The name of the asset file without the extension. Also without the part from @ onward in the filename (used to specify scale factor for images). */ name: string; + + /** The extension of the asset filename. */ type: string; - hash: string; + + /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ uri: string; localUri: string; + + /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ width?: number; + + /** If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ height?: number; downloading: boolean; downloaded: boolean; downloadCallbacks: Array<{ resolve: () => any, reject: (e?: any) => any }>; + /** Downloads the asset data to a local file in the device’s cache directory. Once the returned promise is fulfilled without error, the localUri field of this asset points to a local file containing the asset data. The asset is only downloaded if an up-to-date local file for the asset isn’t already present due to an earlier download. */ downloadAsync(): Promise; + /** Returns the `Expo.Asset` instance representing an asset given its module. */ static fromModule(module: RequireSource): Asset; + + /** + * A helper that wraps `Expo.Asset.fromModule(module).downloadAsync` for convenience. + * @param moduleIds An array of `require('path/to/file')`. Can also be just one module without an Array. + */ static loadAsync(module: RequireSource[] | RequireSource): Promise; } @@ -114,6 +168,8 @@ export namespace AuthSession { export type PlaybackStatus = { isLoaded: false; androidImplementation?: string; + + /** Populated exactly once when an error forces the object to unload. */ error?: string; } | { isLoaded: true; @@ -131,6 +187,8 @@ export type PlaybackStatus = { volume: number; isMuted: boolean; isLooping: boolean; + + /** True exactly once when the track plays to finish. */ didJustFinish: boolean; }; @@ -146,38 +204,241 @@ export interface PlaybackStatusToSet { isLooping?: boolean; } -export type Source = string | RequireSource | Asset; +export type PlaybackSource = RequireSource | { uri: string } | Asset; export class PlaybackObject { - loadAsync(source: Source, initialStatus?: PlaybackStatusToSet, downloadFirst?: boolean): Promise; - unloadAsync(): Promise; - getStatusAsync(): Promise; - setOnPlaybackStatusUpdate(onPlaybackStatusUpdate: (status: PlaybackStatus) => void): void; - setStatusAsync(status: PlaybackStatusToSet): Promise; - playAsync(): Promise; - playFromPositionAsync(positionMillis: number): Promise; - pauseAsync(): Promise; - stopAsync(): Promise; - setPositionAsync(positionMillis: number): Promise; - setRateAsync(rate: number, shouldCorrectPitch: boolean): Promise; - setVolumeAsync(volume: number): Promise; - setIsMutedAsync(isMuted: boolean): Promise; - setIsLoopingAsync(isLooping: boolean): Promise; - setProgressUpdateIntervalAsync(progressUpdateIntervalMillis: number): Promise; + /** + * Gets the `PlaybackStatus` of the `playbackObject`. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. + */ + getStatusAsync(): Promise + + /** + * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. + */ + loadAsync( + /** + * The source of the media. The following forms are supported: + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. + * - `require('path/to/file')` for a media file asset in the source code directory. + * - An `Expo.Asset object` for a media file asset. + */ + source: PlaybackSource, + + /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ + initialStatus?: PlaybackStatusToSet, + + /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ + downloadFirst?: boolean + ): Promise + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ + pauseAsync(): Promise + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. + */ + playAsync(): Promise + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. + */ + playFromPositionAsync( + /** The desired position of playback in milliseconds. */ + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise + + /** + * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. + */ + replayAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise + + /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ + setIsLoopingAsync( + /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ + isLooping: boolean + ): Promise + + /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ + setIsMutedAsync( + /** A boolean describing if the audio of this media should be muted. */ + isMuted: boolean + ): Promise + + /** + * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. + * + * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. + */ + setOnPlaybackStatusUpdate( + /** A function taking a single parameter `PlaybackStatus`. */ + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void + ): void + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ + setPositionAsync( + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise + + /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ + setProgressUpdateIntervalAsync( + /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ + progressUpdateIntervalMillis: number + ): Promise + + /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ + setRateAsync( + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate: number, + + /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ + shouldCorrectPitch: boolean + ): Promise + + /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ + setStatusAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise + + /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ + setVolumeAsync( + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume: number + ): Promise + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ + stopAsync(): Promise + + /** + * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. + */ + unloadAsync(): Promise } +/** + * Provides basic sample playback and recording. + * + * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. + */ export namespace Audio { - enum InterruptionModeIOS { + enum InterruptionModeIos { + /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, + + /** If this option is set, your experience’s audio interrupts audio from other apps. */ INTERRUPTION_MODE_IOS_DO_NOT_MIX = 1, + + /** If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 } + const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; + const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; + enum InterruptionModeAndroid { + /** If this option is set, your experience’s audio interrupts audio from other apps. */ INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, + + /** This is the default option. If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 } + const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; + + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; + + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; + + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; + + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; + + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3 + type RecordingStatus = { canRecord: false, isDoneRecording: false @@ -191,27 +452,8 @@ export namespace Audio { durationMillis: number }; - interface AudioMode { - playsInSilentModeIOS: boolean; - allowsRecordingIOS: boolean; - interruptionModeIOS: InterruptionModeIOS; - shouldDuckAndroid: boolean; - interruptionModeAndroid: InterruptionModeAndroid; - } - - function setIsEnabledAsync(value: boolean): Promise; - function setAudioModeAsync(mode: AudioMode): Promise; - - class Sound extends PlaybackObject { - constructor(); - - static create( - source: Source, - initialStatus?: PlaybackStatusToSet, - onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, - downloadFirst?: boolean - ): Promise<{ sound: Sound, status: PlaybackStatus }>; - } + const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions + const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions interface RecordingOptions { android: { @@ -238,19 +480,112 @@ export namespace Audio { }; } + interface AudioMode { + /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ + playsInSilentModeIOS: boolean; + + /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ + allowsRecordingIOS: boolean; + + /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ + interruptionModeIOS: InterruptionModeIos; + + /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ + shouldDuckAndroid: boolean; + + /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ + interruptionModeAndroid: InterruptionModeAndroid; + } + + function setIsEnabledAsync(value: boolean): Promise; + function setAudioModeAsync(mode: AudioMode): Promise; + + /** This class represents a sound corresponding to an Asset or URL. */ + class Sound extends PlaybackObject { + constructor(); + + /** + * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. + * + * @returns A `Promise` that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: The newly created and loaded Sound object. + * - `status`: The PlaybackStatus of the Sound object. See the AV documentation for further information. + */ + static create( + /** + * The source of the sound. The following forms are supported: + * + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to an audio file on the web. + * - `require('path/to/file')` for an audio file asset in the source code directory. + * - An `Expo.Asset` object for an audio file asset. + */ + source: PlaybackSource, + + /** The initial intended PlaybackStatusToSet of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, + + /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ + downloadFirst?: boolean + ): Promise<{ sound: Sound, status: PlaybackStatus }>; + + + } + class Recording { constructor(); - getStatusAsync(): Promise; - setOnRecordingStatusUpdate(onRecordingStatusUpdate: (status: RecordingStatus) => void): void; - setProgressUpdateInterval(miliss: number): void; - prepareToRecordAsync(options: Recording): Promise; - isPreparedToRecord(): boolean; - startAsync(): Promise; - pauseAsync(): Promise; - stopAndUnloadAsync(): Promise; - getURI(): string | undefined; - createNewLoadedSound(initialStatus: PlaybackStatusToSet, onPlaybackStatusUpdate: (status: PlaybackStatus) => void): Promise<{ sound: Sound, status: PlaybackStatus }>; + /** Gets the `status` of the `Recording`. */ + getStatusAsync(): Promise + + /** Sets a function to be called regularly with the `status` of the `Recording`. */ + setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void + + /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ + setProgressUpdateInterval(progressUpdateIntervalMillis: number): void + + /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ + prepareToRecordAsync( + /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ + options?: RecordingOptions + ): Promise + + /** Begins recording. This method can only be called if the `Recording` has been prepared. */ + startAsync(): Promise + + /** + * Pauses recording. This method can only be called if the Recording has been prepared. + * + * NOTE: This is only available on Android API version 24 and later. + */ + pauseAsync(): Promise + + /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ + stopAndUnloadAsync(): Promise + + /** + * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. + * + * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. + */ + getURI(): string | null | undefined + + /** + * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). + * + * @returns A Promise that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: the newly created and loaded Sound object. + * - `status`: the PlaybackStatus of the Sound object. + */ + createNewLoadedSound( + /** The initial intended `PlaybackStatusToSet` of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null + ): Promise<{ sound: Sound, status: PlaybackStatus }> } } @@ -281,7 +616,7 @@ export interface FullscreenUpdateEvent { } export interface VideoProps { - source?: Source | null; + source?: PlaybackSource | null; posterSource?: URISource | RequireSource; resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; @@ -328,19 +663,28 @@ export class Video extends Component { static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; } -/** - * AppLoading - */ -export type AppLoadingProperties = { +/** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ +export type AppLoadingProps = { + /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ startAsync: () => Promise; + + /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ onFinish: () => void; + + /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ onError?: (error: Error) => void; } | { startAsync: null; onFinish: null; onError?: null; }; -export class AppLoading extends Component { } + +/** + * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. + * + * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. + */ +export class AppLoading extends Component { } /** * BarCodeScanner @@ -376,10 +720,8 @@ export namespace Brightness { /** * Camera */ -export interface TakePictureOptions { +interface PictureOptions { quality?: number; - base64?: boolean; - exif?: boolean; } export interface PictureResponse { uri: string; @@ -388,19 +730,18 @@ export interface PictureResponse { exif: string; base64: string; } -export interface RecordOptions { - quality?: string; +export interface RecordingOptions { + quality?: string | number; maxDuration?: number; maxFileSize?: number; - mute?: boolean; } export class CameraObject { - takePictureAsync(options: TakePictureOptions): Promise; - recordAsync(options: RecordOptions): Promise<{ uri: string; }>; + takePictureAsync(options: PictureOptions): Promise; + recordAsync(options: RecordingOptions): Promise<{ uri: string; }>; stopRecording(): void; getSupportedRatiosAsync(): Promise; // Android only } -export interface CameraProperties extends ViewProperties { +export interface CameraProps extends ViewProperties { flashMode?: string | number; type?: string | number; ratio?: string; @@ -414,7 +755,7 @@ export interface CameraProperties extends ViewProperties { onBarCodeRead?: BarCodeReadCallback; ref?: Ref; } -export interface CameraConstants { +interface CameraConstants { readonly Type: string; readonly FlashMode: string; readonly AutoFocus: string; @@ -422,7 +763,7 @@ export interface CameraConstants { readonly VideoQuality: string; readonly BarCodeType: string; } -export class Camera extends Component { +export class Camera extends Component { static readonly Constants: CameraConstants; } @@ -1600,7 +1941,7 @@ export namespace FaceDetector { x: Axis; y: Axis; } - interface Face { + interface FaceFeature { bounds: { size: { width: number; @@ -1626,7 +1967,7 @@ export namespace FaceDetector { rollAngle?: number; } interface DetectFaceResult { - faces: Face[]; + faces: FaceFeature[]; image: { uri: string; width: number; @@ -1652,11 +1993,11 @@ export namespace FaceDetector { const Constants: _Constants; - interface Options { + interface DetectionOptions { mode?: keyof Mode; detectLandmarks?: keyof Landmarks; runClassifications?: keyof Classifications; } - function detectFaces(uri: string, options?: Options): Promise; + function detectFaces(uri: string, options?: DetectionOptions): Promise; } From 37e7e7d86b8484429c825910f50820293d39a5a6 Mon Sep 17 00:00:00 2001 From: KonstantinKai Date: Fri, 12 Jan 2018 16:37:05 +0200 Subject: [PATCH 02/52] in progress 2 --- types/expo/index.d.ts | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 0ec21968b2..cb991ae6df 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -43,7 +43,7 @@ export namespace Accelerometer { * @returns An EventSubscription object that you can call remove() on when you would like to unsubscribe the listener. */ function addListener(listener: (obj: AccelerometerObject) => any): EventSubscription; - + /** Remove all listeners. */ function removeAllListeners(): void; @@ -65,13 +65,13 @@ export namespace Amplitude { /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ function setUserId(userId: string): void; - + /** Set properties for the current user. */ function setUserProperties(userProperties: HashMap): void; - + /** Clear properties set by `setUserProperties()`. */ function clearUserProperties(): void; - + /** Log an event to Amplitude. */ function logEvent(eventName: string): void; @@ -82,7 +82,7 @@ export namespace Amplitude { /** A map of custom properties. */ properties: HashMap ): void; - + /** Add the current user to a group. */ function setGroup( /** The group name, e.g. `'sports'`. */ @@ -93,7 +93,14 @@ export namespace Amplitude { ): void; } -/** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ +/* + * This module provides an interface to Expo’s asset system. + * An asset is any file that lives alongside the source code of your app that the app needs at runtime. + * Examples include images, fonts and sounds. + * Expo’s asset system integrates with React Native’s, + * so that you can refer to files with require('path/to/file'). + * This is how you refer to static image files in React Native for use in an Image component, for example. + */ export class Asset { constructor({ name, type, hash, uri, width, height }: { name: string; @@ -113,7 +120,13 @@ export class Asset { /** The extension of the asset filename. */ type: string; - /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ + /* + * A URI that points to the asset’s data on the remote server. + * When running the published version of your app, + * this refers to the the location on Expo’s asset server where Expo has stored your asset. + * When running the app from XDE during development, + * this URI points to XDE’s server running on your computer and the asset is served directly from your computer. + */ uri: string; localUri: string; From 981bf1e3e6218ced9e8e80cdeda00bbce765537e Mon Sep 17 00:00:00 2001 From: KonstantinKai Date: Fri, 12 Jan 2018 17:17:34 +0200 Subject: [PATCH 03/52] in progress 3 --- types/expo/index.d.ts | 151 ++++++++++++++++++++++------------------- types/expo/tslint.json | 9 ++- 2 files changed, 89 insertions(+), 71 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index cb991ae6df..cbb6515a52 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -17,17 +17,17 @@ import { ImageRequireSource } from 'react-native'; -export type URISource = ImageURISource; -export type RequireSource = ImageRequireSource; -export type ResizeModeContain = 'contain'; -export type ResizeModeCover = 'cover'; -export type ResizeModeStretch = 'stretch'; -export type Orientation = 'portrait' | 'landscape'; -export type Axis = number; -export interface HashMap { [key: string]: any; } -export type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; -export type BarCodeReadCallback = (params: { type: string; data: string; }) => void; -export type Md5 = string; +type URISource = ImageURISource; +type RequireSource = ImageRequireSource; +type ResizeModeContain = 'contain'; +type ResizeModeCover = 'cover'; +type ResizeModeStretch = 'stretch'; +type Orientation = 'portrait' | 'landscape'; +type Axis = number; +interface HashMap { [key: string]: any; } +type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; +type BarCodeReadCallback = (params: { type: string; data: string; }) => void; +type Md5 = string; /** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ export namespace Accelerometer { @@ -93,14 +93,7 @@ export namespace Amplitude { ): void; } -/* - * This module provides an interface to Expo’s asset system. - * An asset is any file that lives alongside the source code of your app that the app needs at runtime. - * Examples include images, fonts and sounds. - * Expo’s asset system integrates with React Native’s, - * so that you can refer to files with require('path/to/file'). - * This is how you refer to static image files in React Native for use in an Image component, for example. - */ + /** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ export class Asset { constructor({ name, type, hash, uri, width, height }: { name: string; @@ -120,13 +113,7 @@ export class Asset { /** The extension of the asset filename. */ type: string; - /* - * A URI that points to the asset’s data on the remote server. - * When running the published version of your app, - * this refers to the the location on Expo’s asset server where Expo has stored your asset. - * When running the app from XDE during development, - * this URI points to XDE’s server running on your computer and the asset is served directly from your computer. - */ + /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ uri: string; localUri: string; @@ -225,7 +212,7 @@ export class PlaybackObject { * * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. */ - getStatusAsync(): Promise + getStatusAsync(): Promise; /** * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. @@ -246,17 +233,17 @@ export class PlaybackObject { /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ downloadFirst?: boolean - ): Promise + ): Promise; /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ - pauseAsync(): Promise + pauseAsync(): Promise; /** * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. * * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. */ - playAsync(): Promise + playAsync(): Promise; /** * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. @@ -272,7 +259,7 @@ export class PlaybackObject { toleranceMillisBefore: number, toleranceMillisAfter: number } - ): Promise + ): Promise; /** * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. @@ -282,19 +269,19 @@ export class PlaybackObject { replayAsync( /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ status: PlaybackStatusToSet - ): Promise + ): Promise; /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ setIsLoopingAsync( /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ isLooping: boolean - ): Promise + ): Promise; /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ setIsMutedAsync( /** A boolean describing if the audio of this media should be muted. */ isMuted: boolean - ): Promise + ): Promise; /** * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. @@ -304,7 +291,7 @@ export class PlaybackObject { setOnPlaybackStatusUpdate( /** A function taking a single parameter `PlaybackStatus`. */ onPlaybackStatusUpdate?: (status: PlaybackStatus) => void - ): void + ): void; /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ setPositionAsync( @@ -315,13 +302,13 @@ export class PlaybackObject { toleranceMillisBefore: number, toleranceMillisAfter: number } - ): Promise + ): Promise; /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ setProgressUpdateIntervalAsync( /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ progressUpdateIntervalMillis: number - ): Promise + ): Promise; /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ setRateAsync( @@ -330,29 +317,29 @@ export class PlaybackObject { /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ shouldCorrectPitch: boolean - ): Promise + ): Promise; /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ setStatusAsync( /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ status: PlaybackStatusToSet - ): Promise + ): Promise; /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ setVolumeAsync( /** A number between `0.0` (silence) and `1.0` (maximum volume). */ volume: number - ): Promise + ): Promise; /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ - stopAsync(): Promise + stopAsync(): Promise; /** * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. * * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. */ - unloadAsync(): Promise + unloadAsync(): Promise; } /** @@ -450,7 +437,7 @@ export namespace Audio { const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3 + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; type RecordingStatus = { canRecord: false, @@ -465,8 +452,8 @@ export namespace Audio { durationMillis: number }; - const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions - const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions + const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; + const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; interface RecordingOptions { android: { @@ -496,7 +483,7 @@ export namespace Audio { interface AudioMode { /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ playsInSilentModeIOS: boolean; - + /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ allowsRecordingIOS: boolean; @@ -539,51 +526,49 @@ export namespace Audio { /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, - + /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ downloadFirst?: boolean ): Promise<{ sound: Sound, status: PlaybackStatus }>; - - } class Recording { constructor(); /** Gets the `status` of the `Recording`. */ - getStatusAsync(): Promise + getStatusAsync(): Promise; /** Sets a function to be called regularly with the `status` of the `Recording`. */ - setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void + setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void; /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ - setProgressUpdateInterval(progressUpdateIntervalMillis: number): void + setProgressUpdateInterval(progressUpdateIntervalMillis: number): void; /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ prepareToRecordAsync( /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ options?: RecordingOptions - ): Promise + ): Promise; /** Begins recording. This method can only be called if the `Recording` has been prepared. */ - startAsync(): Promise + startAsync(): Promise; /** * Pauses recording. This method can only be called if the Recording has been prepared. * * NOTE: This is only available on Android API version 24 and later. */ - pauseAsync(): Promise + pauseAsync(): Promise; /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ - stopAndUnloadAsync(): Promise + stopAndUnloadAsync(): Promise; /** * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. * * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. */ - getURI(): string | null | undefined + getURI(): string | null | undefined; /** * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). @@ -598,7 +583,7 @@ export namespace Audio { /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null - ): Promise<{ sound: Sound, status: PlaybackStatus }> + ): Promise<{ sound: Sound, status: PlaybackStatus }>; } } @@ -1230,15 +1215,31 @@ export namespace FileSystem { } } -/** - * Fingerprint - */ +/** Use TouchID/FaceID (iOS) or the Fingerprint API (Android) to authenticate the user with a fingerprint scan. */ export namespace Fingerprint { - type FingerprintAuthenticationResult = { success: true } | { success: false, error: string }; + type FingerprintAuthenticationResult = { + success: true + } | { + success: false, + /** Error code in the case where authentication fails. */ + error: string + }; + + /** Determine whether the Fingerprint scanner is available on the device. */ function hasHardwareAsync(): Promise; + + /** Determine whether the device has saved fingerprints to use for authentication. */ function isEnrolledAsync(): Promise; + + /** + * Attempts to authenticate via Fingerprint. Android: When using the fingerprint module on Android, you need to provide a UI component to prompt the user to scan their fingerprint, as the OS has no default alert for it. + * + * @param promptMessage A message that is shown alongside the TouchID/FaceID prompt. (iOS only) + */ function authenticateAsync(promptMessageIOS?: string): Promise; + + /** Cancels the fingerprint authentication flow. (Android only) */ function cancelAuthenticate(): void; } @@ -1298,9 +1299,7 @@ export namespace Google { function logInAsync(config: LogInConfig): Promise; } -/** - * Gyroscope - */ +/** Access the device gyroscope sensor to respond to changes in rotation in 3d space. */ export namespace Gyroscope { interface GyroscopeObject { x: Axis; @@ -1308,8 +1307,13 @@ export namespace Gyroscope { z: Axis; } + /** A callback that is invoked when an gyroscope update is available. */ function addListener(listener: (obj: GyroscopeObject) => any): EventSubscription; + + /** Remove all listeners. */ function removeAllListeners(): void; + + /** Subscribe for updates to the gyroscope. */ function setUpdateInterval(intervalMs: number): void; } @@ -1894,17 +1898,24 @@ export function takeSnapshotAsync( } ): Promise; -/** - * Util - */ +/** Helpful utility functions that don’t fit anywhere else, including some localization and internationalization methods. */ export namespace Util { - function getCurrentDeviceCountryAsync(): Promise; + /** Returns the current device country code. */ + function getCurrentDeviceCountryAsync(): Promise; + + /** Returns the current device locale as a string. */ function getCurrentLocaleAsync(): Promise; + + /** Returns the current device time zone name. */ function getCurrentTimeZoneAsync(): Promise; + + /** Reloads the current experience. This will fetch and load the newest available JavaScript supported by the device’s Expo environment. This is useful for triggering an update of your experience if you have published a new version. */ function reload(): void; + + /** _Android only_. Invokes a callback when a new version of your app is successfully downloaded in the background. */ function addNewVersionListenerExperimental(listener: (event: { manifest: object; - }) => void): { remove(): void; }; // Android only + }) => void): { remove(): void; }; } /** diff --git a/types/expo/tslint.json b/types/expo/tslint.json index 3db14f85ea..b88d2896cb 100644 --- a/types/expo/tslint.json +++ b/types/expo/tslint.json @@ -1 +1,8 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "strict-export-declare-modifiers": false, + "void-return": false, + "max-line-length": false + } +} From b8bfd366985160f8a369903dba972c40b2a17ab8 Mon Sep 17 00:00:00 2001 From: KonstantinKai Date: Fri, 12 Jan 2018 17:28:58 +0200 Subject: [PATCH 04/52] in progress 4 --- types/expo/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index cbb6515a52..9d64337918 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -115,6 +115,8 @@ export class Asset { /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ uri: string; + + /** If the asset has been downloaded (by calling `downloadAsync()`), the `file://` URI pointing to the local file on the device that contains the asset data. */ localUri: string; /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ From 103c762f062aae81c9109783039e0e8948d493f7 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Sat, 20 Jan 2018 13:07:48 +0100 Subject: [PATCH 05/52] Wrap in expo module --- types/expo/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 9d64337918..e878758519 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -17,6 +17,7 @@ import { ImageRequireSource } from 'react-native'; +declare module 'expo' { type URISource = ImageURISource; type RequireSource = ImageRequireSource; type ResizeModeContain = 'contain'; @@ -2027,3 +2028,4 @@ export namespace FaceDetector { function detectFaces(uri: string, options?: DetectionOptions): Promise; } +} From 047c6883b9f2eaf69ac95844e52a535187c1e3cd Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Sat, 20 Jan 2018 13:13:12 +0100 Subject: [PATCH 06/52] Auto format --- types/expo/index.d.ts | 3766 ++++++++++++++++++++--------------------- 1 file changed, 1883 insertions(+), 1883 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index e878758519..dc3b57657d 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -18,2014 +18,2014 @@ import { } from 'react-native'; declare module 'expo' { -type URISource = ImageURISource; -type RequireSource = ImageRequireSource; -type ResizeModeContain = 'contain'; -type ResizeModeCover = 'cover'; -type ResizeModeStretch = 'stretch'; -type Orientation = 'portrait' | 'landscape'; -type Axis = number; -interface HashMap { [key: string]: any; } -type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; -type BarCodeReadCallback = (params: { type: string; data: string; }) => void; -type Md5 = string; + type URISource = ImageURISource; + type RequireSource = ImageRequireSource; + type ResizeModeContain = 'contain'; + type ResizeModeCover = 'cover'; + type ResizeModeStretch = 'stretch'; + type Orientation = 'portrait' | 'landscape'; + type Axis = number; + interface HashMap { [key: string]: any; } + type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; + type BarCodeReadCallback = (params: { type: string; data: string; }) => void; + type Md5 = string; -/** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ -export namespace Accelerometer { - interface AccelerometerObject { - x: Axis; - y: Axis; - z: Axis; + /** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ + export namespace Accelerometer { + interface AccelerometerObject { + x: Axis; + y: Axis; + z: Axis; + } + + /** + * Subscribe for updates to the accelerometer. + * @param listener A callback that is invoked when an accelerometer update is available. When invoked, the listener is provided a single argumument that is an object containing keys x, y, z. + * @returns An EventSubscription object that you can call remove() on when you would like to unsubscribe the listener. + */ + function addListener(listener: (obj: AccelerometerObject) => any): EventSubscription; + + /** Remove all listeners. */ + function removeAllListeners(): void; + + /** + * Subscribe for updates to the accelerometer. + * @param intervalMs Desired interval in milliseconds between accelerometer updates. + */ + function setUpdateInterval(intervalMs: number): void; } /** - * Subscribe for updates to the accelerometer. - * @param listener A callback that is invoked when an accelerometer update is available. When invoked, the listener is provided a single argumument that is an object containing keys x, y, z. - * @returns An EventSubscription object that you can call remove() on when you would like to unsubscribe the listener. + * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. + * + * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. */ - function addListener(listener: (obj: AccelerometerObject) => any): EventSubscription; + export namespace Amplitude { + /** Initializes Amplitude with your Amplitude API key. */ + function initialize(apiKey: string): void; - /** Remove all listeners. */ - function removeAllListeners(): void; + /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ + function setUserId(userId: string): void; - /** - * Subscribe for updates to the accelerometer. - * @param intervalMs Desired interval in milliseconds between accelerometer updates. - */ - function setUpdateInterval(intervalMs: number): void; -} + /** Set properties for the current user. */ + function setUserProperties(userProperties: HashMap): void; -/** - * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. - * - * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. - */ -export namespace Amplitude { - /** Initializes Amplitude with your Amplitude API key. */ - function initialize(apiKey: string): void; + /** Clear properties set by `setUserProperties()`. */ + function clearUserProperties(): void; - /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ - function setUserId(userId: string): void; + /** Log an event to Amplitude. */ + function logEvent(eventName: string): void; - /** Set properties for the current user. */ - function setUserProperties(userProperties: HashMap): void; + /** Log an event to Amplitude with custom properties. */ + function logEventWithProperties( + eventName: string, - /** Clear properties set by `setUserProperties()`. */ - function clearUserProperties(): void; + /** A map of custom properties. */ + properties: HashMap + ): void; - /** Log an event to Amplitude. */ - function logEvent(eventName: string): void; + /** Add the current user to a group. */ + function setGroup( + /** The group name, e.g. `'sports'`. */ + groupType: string, - /** Log an event to Amplitude with custom properties. */ - function logEventWithProperties( - eventName: string, + /** An array of group names, e.g. `['tennis', 'soccer']`. */ + groupNames: string[] + ): void; + } - /** A map of custom properties. */ - properties: HashMap - ): void; + /** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ + export class Asset { + constructor({ name, type, hash, uri, width, height }: { + name: string; + type: string; + hash: string; + uri: string; + width?: number; + height?: number; + }); - /** Add the current user to a group. */ - function setGroup( - /** The group name, e.g. `'sports'`. */ - groupType: string, + /** The MD5 hash of the asset’s data. */ + hash: Md5; - /** An array of group names, e.g. `['tennis', 'soccer']`. */ - groupNames: string[] - ): void; -} - - /** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ -export class Asset { - constructor({ name, type, hash, uri, width, height }: { + /** The name of the asset file without the extension. Also without the part from @ onward in the filename (used to specify scale factor for images). */ name: string; + + /** The extension of the asset filename. */ type: string; - hash: string; + + /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ uri: string; + + /** If the asset has been downloaded (by calling `downloadAsync()`), the `file://` URI pointing to the local file on the device that contains the asset data. */ + localUri: string; + + /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ width?: number; + + /** If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ height?: number; - }); - /** The MD5 hash of the asset’s data. */ - hash: Md5; + downloading: boolean; + downloaded: boolean; + downloadCallbacks: Array<{ resolve: () => any, reject: (e?: any) => any }>; - /** The name of the asset file without the extension. Also without the part from @ onward in the filename (used to specify scale factor for images). */ - name: string; + /** Downloads the asset data to a local file in the device’s cache directory. Once the returned promise is fulfilled without error, the localUri field of this asset points to a local file containing the asset data. The asset is only downloaded if an up-to-date local file for the asset isn’t already present due to an earlier download. */ + downloadAsync(): Promise; - /** The extension of the asset filename. */ - type: string; + /** Returns the `Expo.Asset` instance representing an asset given its module. */ + static fromModule(module: RequireSource): Asset; - /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ - uri: string; - - /** If the asset has been downloaded (by calling `downloadAsync()`), the `file://` URI pointing to the local file on the device that contains the asset data. */ - localUri: string; - - /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ - width?: number; - - /** If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ - height?: number; - - downloading: boolean; - downloaded: boolean; - downloadCallbacks: Array<{ resolve: () => any, reject: (e?: any) => any }>; - - /** Downloads the asset data to a local file in the device’s cache directory. Once the returned promise is fulfilled without error, the localUri field of this asset points to a local file containing the asset data. The asset is only downloaded if an up-to-date local file for the asset isn’t already present due to an earlier download. */ - downloadAsync(): Promise; - - /** Returns the `Expo.Asset` instance representing an asset given its module. */ - static fromModule(module: RequireSource): Asset; - - /** - * A helper that wraps `Expo.Asset.fromModule(module).downloadAsync` for convenience. - * @param moduleIds An array of `require('path/to/file')`. Can also be just one module without an Array. - */ - static loadAsync(module: RequireSource[] | RequireSource): Promise; -} - -/** - * AuthSession - */ -export namespace AuthSession { - function startAsync(options: { authUrl: string; returnUrl: string; }): Promise<{ - type: 'cancel'; - } | { - type: 'dismissed'; - } | { - type: 'success'; - params: HashMap; - event: HashMap; - } | { - type: 'error'; - params: HashMap; - errorCode: string; - event: HashMap; - }>; - function dismiss(): void; - function getRedirectUrl(): string; -} - -/** - * AV - */ -export type PlaybackStatus = { - isLoaded: false; - androidImplementation?: string; - - /** Populated exactly once when an error forces the object to unload. */ - error?: string; -} | { - isLoaded: true; - androidImplementation?: string; - uri: string; - progressUpdateIntervalMillis: number; - durationMillis?: number; - positionMillis: number; - playableDurationMillis?: number; - shouldPlay: boolean; - isPlaying: boolean; - isBuffering: boolean; - rate: number; - shouldCorrectPitch: boolean; - volume: number; - isMuted: boolean; - isLooping: boolean; - - /** True exactly once when the track plays to finish. */ - didJustFinish: boolean; -}; - -export interface PlaybackStatusToSet { - androidImplementation?: string; - progressUpdateIntervalMillis?: number; - positionMillis?: number; - shouldPlay?: boolean; - rate?: FloatFromZeroToOne; - shouldCorrectPitch?: boolean; - volume?: FloatFromZeroToOne; - isMuted?: boolean; - isLooping?: boolean; -} - -export type PlaybackSource = RequireSource | { uri: string } | Asset; - -export class PlaybackObject { - /** - * Gets the `PlaybackStatus` of the `playbackObject`. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. - */ - getStatusAsync(): Promise; - - /** - * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. - */ - loadAsync( /** - * The source of the media. The following forms are supported: - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. - * - `require('path/to/file')` for a media file asset in the source code directory. - * - An `Expo.Asset object` for a media file asset. + * A helper that wraps `Expo.Asset.fromModule(module).downloadAsync` for convenience. + * @param moduleIds An array of `require('path/to/file')`. Can also be just one module without an Array. */ - source: PlaybackSource, - - /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ - initialStatus?: PlaybackStatusToSet, - - /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ - downloadFirst?: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ - pauseAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. - */ - playAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. - */ - playFromPositionAsync( - /** The desired position of playback in milliseconds. */ - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** - * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. - */ - replayAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ - setIsLoopingAsync( - /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ - isLooping: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ - setIsMutedAsync( - /** A boolean describing if the audio of this media should be muted. */ - isMuted: boolean - ): Promise; - - /** - * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. - * - * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. - */ - setOnPlaybackStatusUpdate( - /** A function taking a single parameter `PlaybackStatus`. */ - onPlaybackStatusUpdate?: (status: PlaybackStatus) => void - ): void; - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ - setPositionAsync( - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ - setProgressUpdateIntervalAsync( - /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ - progressUpdateIntervalMillis: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ - setRateAsync( - /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ - rate: number, - - /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ - shouldCorrectPitch: boolean - ): Promise; - - /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ - setStatusAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ - setVolumeAsync( - /** A number between `0.0` (silence) and `1.0` (maximum volume). */ - volume: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ - stopAsync(): Promise; - - /** - * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. - */ - unloadAsync(): Promise; -} - -/** - * Provides basic sample playback and recording. - * - * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. - */ -export namespace Audio { - enum InterruptionModeIos { - /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ - INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, - - /** If this option is set, your experience’s audio interrupts audio from other apps. */ - INTERRUPTION_MODE_IOS_DO_NOT_MIX = 1, - - /** If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ - INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 + static loadAsync(module: RequireSource[] | RequireSource): Promise; } - const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; - const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; - const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; - - enum InterruptionModeAndroid { - /** If this option is set, your experience’s audio interrupts audio from other apps. */ - INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, - - /** This is the default option. If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ - INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 + /** + * AuthSession + */ + export namespace AuthSession { + function startAsync(options: { authUrl: string; returnUrl: string; }): Promise<{ + type: 'cancel'; + } | { + type: 'dismissed'; + } | { + type: 'success'; + params: HashMap; + event: HashMap; + } | { + type: 'error'; + params: HashMap; + errorCode: string; + event: HashMap; + }>; + function dismiss(): void; + function getRedirectUrl(): string; } - const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; - const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; + /** + * AV + */ + export type PlaybackStatus = { + isLoaded: false; + androidImplementation?: string; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; - - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; - - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; - - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; - - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; - - type RecordingStatus = { - canRecord: false, - isDoneRecording: false + /** Populated exactly once when an error forces the object to unload. */ + error?: string; } | { - canRecord: true, - isRecording: boolean, - durationMillis: number - } | { - canRecord: false, - isDoneRecording: true, - durationMillis: number - }; + isLoaded: true; + androidImplementation?: string; + uri: string; + progressUpdateIntervalMillis: number; + durationMillis?: number; + positionMillis: number; + playableDurationMillis?: number; + shouldPlay: boolean; + isPlaying: boolean; + isBuffering: boolean; + rate: number; + shouldCorrectPitch: boolean; + volume: number; + isMuted: boolean; + isLooping: boolean; - const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; - const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; + /** True exactly once when the track plays to finish. */ + didJustFinish: boolean; + }; - interface RecordingOptions { - android: { - extension: string; - outputFormat: number; - audioEncoder: number; - sampleRate?: number; - numberOfChannels?: number; - bitRate?: number; - maxFileSize?: number; - }; - ios: { - extension: string; - outputFormat?: string | number; - audioQuality: number; - sampleRate: number; - numberOfChannels: number; - bitRate: number; - bitRateStrategy?: number; - bitDepthHint?: number; - linearPCMBitDepth?: number; - linearPCMIsBigEndian?: boolean; - linearPCMIsFloat?: boolean; - }; + export interface PlaybackStatusToSet { + androidImplementation?: string; + progressUpdateIntervalMillis?: number; + positionMillis?: number; + shouldPlay?: boolean; + rate?: FloatFromZeroToOne; + shouldCorrectPitch?: boolean; + volume?: FloatFromZeroToOne; + isMuted?: boolean; + isLooping?: boolean; } - interface AudioMode { - /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ - playsInSilentModeIOS: boolean; - - /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ - allowsRecordingIOS: boolean; - - /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ - interruptionModeIOS: InterruptionModeIos; - - /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ - shouldDuckAndroid: boolean; - - /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ - interruptionModeAndroid: InterruptionModeAndroid; - } - - function setIsEnabledAsync(value: boolean): Promise; - function setAudioModeAsync(mode: AudioMode): Promise; - - /** This class represents a sound corresponding to an Asset or URL. */ - class Sound extends PlaybackObject { - constructor(); + export type PlaybackSource = RequireSource | { uri: string } | Asset; + export class PlaybackObject { /** - * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. + * Gets the `PlaybackStatus` of the `playbackObject`. * - * @returns A `Promise` that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: - * - `sound`: The newly created and loaded Sound object. - * - `status`: The PlaybackStatus of the Sound object. See the AV documentation for further information. + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. */ - static create( + getStatusAsync(): Promise; + + /** + * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. + */ + loadAsync( /** - * The source of the sound. The following forms are supported: - * - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to an audio file on the web. - * - `require('path/to/file')` for an audio file asset in the source code directory. - * - An `Expo.Asset` object for an audio file asset. + * The source of the media. The following forms are supported: + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. + * - `require('path/to/file')` for a media file asset in the source code directory. + * - An `Expo.Asset object` for a media file asset. */ source: PlaybackSource, - /** The initial intended PlaybackStatusToSet of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ initialStatus?: PlaybackStatusToSet, - /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ - onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, - - /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ + /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ downloadFirst?: boolean - ): Promise<{ sound: Sound, status: PlaybackStatus }>; - } + ): Promise; - class Recording { - constructor(); - - /** Gets the `status` of the `Recording`. */ - getStatusAsync(): Promise; - - /** Sets a function to be called regularly with the `status` of the `Recording`. */ - setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void; - - /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ - setProgressUpdateInterval(progressUpdateIntervalMillis: number): void; - - /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ - prepareToRecordAsync( - /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ - options?: RecordingOptions - ): Promise; - - /** Begins recording. This method can only be called if the `Recording` has been prepared. */ - startAsync(): Promise; + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ + pauseAsync(): Promise; /** - * Pauses recording. This method can only be called if the Recording has been prepared. + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. * - * NOTE: This is only available on Android API version 24 and later. + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. */ - pauseAsync(): Promise; - - /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ - stopAndUnloadAsync(): Promise; + playAsync(): Promise; /** - * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. * - * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. */ - getURI(): string | null | undefined; + playFromPositionAsync( + /** The desired position of playback in milliseconds. */ + positionMillis: number, - /** - * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). - * - * @returns A Promise that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: - * - `sound`: the newly created and loaded Sound object. - * - `status`: the PlaybackStatus of the Sound object. - */ - createNewLoadedSound( - /** The initial intended `PlaybackStatusToSet` of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ - initialStatus?: PlaybackStatusToSet, - - /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ - onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null - ): Promise<{ sound: Sound, status: PlaybackStatus }>; - } -} - -/** - * Expo Video - */ -export interface NaturalSize { - width: number; - height: number; - orientation: Orientation; -} - -export interface ReadyForDisplayEvent { - naturalSize: NaturalSize; - status: PlaybackStatus; -} - -export enum FullscreenUpdateVariants { - IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, - IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, - IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, - IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 -} - -export interface FullscreenUpdateEvent { - fullscreenUpdate: FullscreenUpdateVariants; - status: PlaybackStatus; -} - -export interface VideoProps { - source?: PlaybackSource | null; - posterSource?: URISource | RequireSource; - - resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; - useNativeControls?: boolean; - usePoster?: boolean; - - onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; - onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; - onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; - - onLoadStart?: () => void; - onLoad?: (status: PlaybackStatus) => void; - onError?: (error: string) => void; - - status?: PlaybackStatusToSet; - progressUpdateIntervalMillis?: number; - positionMillis?: number; - shouldPlay?: boolean; - rate?: number; - shouldCorrectPitch?: boolean; - volume?: number; - isMuted?: boolean; - isLooping?: boolean; - - scaleX?: number; - scaleY?: number; - translateX?: number; - translateY?: number; - rotation?: number; - ref?: Ref; -} - -export interface VideoState { - showPoster: boolean; -} - -export class Video extends Component { - static RESIZE_MODE_CONTAIN: ResizeModeContain; - static RESIZE_MODE_COVER: ResizeModeCover; - static RESIZE_MODE_STRETCH: ResizeModeStretch; - static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; - static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; - static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; - static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; -} - -/** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ -export type AppLoadingProps = { - /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ - startAsync: () => Promise; - - /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ - onFinish: () => void; - - /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ - onError?: (error: Error) => void; -} | { - startAsync: null; - onFinish: null; - onError?: null; -}; - -/** - * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. - * - * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. - */ -export class AppLoading extends Component { } - -/** - * BarCodeScanner - */ -export interface BarCodeScannerProps extends ViewProperties { - type?: 'front' | 'back'; - torchMode?: 'on' | 'off'; - barCodeTypes?: string[]; - onBarCodeRead?: BarCodeReadCallback; -} - -export class BarCodeScanner extends Component { } - -/** - * BlurView - */ -export interface BlurViewProps extends ViewProperties { - tint: 'light' | 'default' | 'dark'; - intensity: number; -} -export class BlurView extends Component { } - -/** - * Brightness - */ -export namespace Brightness { - function setBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; - function getBrightnessAsync(): Promise; - function getSystemBrightnessAsync(): Promise; - function setSystemBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; -} - -/** - * Camera - */ -interface PictureOptions { - quality?: number; -} -export interface PictureResponse { - uri: string; - width: number; - height: number; - exif: string; - base64: string; -} -export interface RecordingOptions { - quality?: string | number; - maxDuration?: number; - maxFileSize?: number; -} -export class CameraObject { - takePictureAsync(options: PictureOptions): Promise; - recordAsync(options: RecordingOptions): Promise<{ uri: string; }>; - stopRecording(): void; - getSupportedRatiosAsync(): Promise; // Android only -} -export interface CameraProps extends ViewProperties { - flashMode?: string | number; - type?: string | number; - ratio?: string; - autoFocus?: string | number | boolean; - focusDepth?: FloatFromZeroToOne; - zoom?: FloatFromZeroToOne; - whiteBalance?: string | number; - barCodeTypes?: string[]; - onCameraReady?: () => void; - onMountError?: () => void; - onBarCodeRead?: BarCodeReadCallback; - ref?: Ref; -} -interface CameraConstants { - readonly Type: string; - readonly FlashMode: string; - readonly AutoFocus: string; - readonly WhiteBalance: string; - readonly VideoQuality: string; - readonly BarCodeType: string; -} -export class Camera extends Component { - static readonly Constants: CameraConstants; -} - -/** - * Constants - */ -export namespace Constants { - const appOwnership: 'expo' | 'standalone' | 'guest'; - const expoVersion: string; - const deviceId: string; - const deviceName: string; - const deviceYearClass: number; - const isDevice: boolean; - - interface Platform { - ios: { - platform: string; - model: string; - userInterfaceIdiom: string; - }; - } - const platform: Platform; - const sessionId: string; - const statusBarHeight: number; - const systemFonts: string[]; - - interface Manifest { - name: string; - description?: string; - slug?: string; - sdkVersion?: string; - version?: string; - orientation?: Orientation; - primaryColor?: string; - privacy?: 'public' | 'unlisted'; - scheme?: string; - icon?: string; - platforms?: string[]; - githubUrl?: string; - notification?: { - icon?: string, - color?: string, - androidMode?: 'default' | 'collapse', - androidCollapsedTitle?: string - }; - loading?: { - icon?: string, - exponentIconColor?: 'white' | 'blue', - exponentIconGrayscale?: 1 | 0, - backgroundImage?: string, - backgroundColor?: string, - hideExponentText?: boolean - }; - appKey?: string; - androidStatusBar?: { - barStyle?: 'lignt-content' | 'dark-content', - backgroundColor?: string - }; - androidShowExponentNotificationInShellApp?: boolean; - extra?: { - [propName: string]: any - }; - rnCliPath?: any; - entryPoint?: string; - packagerOpts?: { - hostType?: string, - dev?: boolean, - strict?: boolean, - minify?: boolean, - urlType?: string, - urlRandomness?: string, - lanType?: string, - [propName: string]: any - }; - ignoreNodeModulesValidation?: any; - nodeModulesPath?: string; - ios?: { - bundleIdentifier?: string, - buildNumber?: string, - config?: { - usesNonExemptEncryption?: boolean, - googleSignIn?: { - reservedClientId: string - } - }, - supportsTablet?: boolean, - infoPlist?: any - }; - android?: { - package?: string, - versionCode?: string, - config?: { - fabric?: { - apiKey: string, - buildSecret: string - }, - googleMaps?: { - apiKey: string - }, - googleSignIn?: { - apiKey: string, - certificateHash: string - } + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number } - }; - facebookScheme?: any; - facebookAppId?: string; - facebookDisplayName?: string; - splash?: { - backgroundColor?: string; - resizeMode?: ResizeModeContain | ResizeModeCover; - image?: string; - }; - assetBundlePatterns?: string[]; - releaseChannel: string; - [propName: string]: any; - } - const manifest: Manifest; - const linkingUri: string; -} + ): Promise; -/** - * Contacts - */ -export namespace Contacts { - type PhoneNumbers = 'phoneNumbers'; - type Emails = 'emails'; - type Addresses = 'addresses'; - type Image = 'image'; - type Thumbnail = 'thumbnail'; - type Note = 'note'; - type Birthday = 'birthday'; - type NonGregorianBirthday = 'nonGregorianBirthday'; - type NamePrefix = 'namePrefix'; - type NameSuffix = 'nameSuffix'; - type PhoneticFirstName = 'phoneticFirstName'; - type PhoneticMiddleName = 'phoneticMiddleName'; - type PhoneticLastName = 'phoneticLastName'; - type SocialProfiles = 'socialProfiles'; - type InstantMessageAddresses = 'instantMessageAddresses'; - type UrlAddresses = 'urlAddresses'; - type Dates = 'dates'; - type Relationships = 'relationships'; + /** + * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. + */ + replayAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; - const PHONE_NUMBERS: PhoneNumbers; - const EMAILS: Emails; - const ADDRESSES: Addresses; - const IMAGE: Image; - const THUMBNAIL: Thumbnail; - const NOTE: Note; - const BIRTHDAY: Birthday; - const NON_GREGORIAN_BIRTHDAY: NonGregorianBirthday; - const NAME_PREFIX: NamePrefix; - const NAME_SUFFIX: NameSuffix; - const PHONETIC_FIRST_NAME: PhoneticFirstName; - const PHONETIC_MIDDLE_NAME: PhoneticMiddleName; - const PHONETIC_LAST_NAME: PhoneticLastName; - const SOCIAL_PROFILES: SocialProfiles; - const IM_ADDRESSES: InstantMessageAddresses; - const URLS: UrlAddresses; - const DATES: Dates; - const RELATIONSHIPS: Relationships; + /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ + setIsLoopingAsync( + /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ + isLooping: boolean + ): Promise; - type FieldType = PhoneNumbers | Emails | Addresses | Image | Thumbnail | - Note | Birthday | NonGregorianBirthday | NamePrefix | NameSuffix | - PhoneticFirstName | PhoneticMiddleName | PhoneticLastName | SocialProfiles | - InstantMessageAddresses | UrlAddresses | Dates | Relationships; + /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ + setIsMutedAsync( + /** A boolean describing if the audio of this media should be muted. */ + isMuted: boolean + ): Promise; - interface Options { - pageSize?: number; - pageOffset?: number; - fields?: FieldType[]; - } + /** + * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. + * + * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. + */ + setOnPlaybackStatusUpdate( + /** A function taking a single parameter `PlaybackStatus`. */ + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void + ): void; - interface Contact { - id: string; - contactType: string; - name: string; - firstName?: string; - middleName?: string; - lastName?: string; - previousLastName?: string; - namePrefix?: string; - nameSuffix?: string; - nickname?: string; - phoneticFirstName?: string; - phoneticMiddleName?: string; - phoneticLastName?: string; - emails?: Array<{ - email?: string; - primary?: boolean; - label: string; - id: string; - }>; - phoneNumbers?: Array<{ - number?: string; - primary?: boolean; - digits?: string; - countryCode?: string; - label: string; - id: string; - }>; - addresses?: Array<{ - street?: string; - city?: string; - country?: string; - region?: string; - neighborhood?: string; - postalCode?: string; - poBox?: string; - isoCountryCode?: string; - label: string; - id: string; - }>; - socialProfiles?: Array<{ - service?: string; - localizedProfile?: string; - url?: string; - username?: string; - userId?: string; - label: string; - id: string; - }>; - instantMessageAddresses?: Array<{ - service?: string; - username?: string; - localizedService?: string; - label: string; - id: string; - }>; - urls?: { - label: string; - url?: string; - id: string; - }; - company?: string; - jobTitle?: string; - department?: string; - imageAvailable?: boolean; - image?: { - uri?: string; - }; - thumbnail?: { - uri?: string; - }; - note?: string; - dates?: Array<{ - day?: number; - month?: number; - year?: number; - id: string; - label: string; - }>; - relationships?: Array<{ - label: string; - name?: string; - id: string; - }>; - } + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ + setPositionAsync( + positionMillis: number, - interface Response { - data: Contact[]; - total: number; - hasNextPage: boolean; - hasPreviousPage: boolean; - } + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; - function getContactsAsync(options: Options): Promise; - function getContactByIdAsync(options: { id?: string; fields?: FieldType[] }): Promise; -} + /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ + setProgressUpdateIntervalAsync( + /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ + progressUpdateIntervalMillis: number + ): Promise; -/** - * DocumentPicker - */ -export namespace DocumentPicker { - interface Options { - type?: string; - } - type Response = { - type: 'success'; - uri: string; - name: string; - size: number; - } | { - type: 'cancel'; - }; + /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ + setRateAsync( + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate: number, - function getDocumentAsync(options?: Options): Promise; -} + /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ + shouldCorrectPitch: boolean + ): Promise; -/** - * ErrorRecovery - */ -export namespace ErrorRecovery { - function setRecoveryProps(props: HashMap): void; -} + /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ + setStatusAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; -/** - * Facebook - */ -export namespace Facebook { - interface Options { - permissions?: string[]; - behavior?: 'web' | 'native' | 'browser' | 'system'; - } - type Response = { - type: 'success'; - token: string; - expires: number; - } | { - type: 'cancel'; - }; - function logInWithReadPermissionsAsync(appId: string, options?: Options): Promise; -} + /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ + setVolumeAsync( + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume: number + ): Promise; -/** - * Facebook Ads - */ -export namespace FacebookAds { - /** - * Interstitial Ads - */ - namespace InterstitialAdManager { - function showAd(placementId: string): Promise; + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ + stopAsync(): Promise; + + /** + * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. + */ + unloadAsync(): Promise; } /** - * Native Ads - */ - type MediaCachePolicy = 'none' | 'icon' | 'image' | 'all'; - class NativeAdsManager { - constructor(placementId: string, numberOfAdsToRequest?: number); - disableAutoRefresh(): void; - setMediaCachePolicy(cachePolicy: MediaCachePolicy): void; - } - - function withNativeAd(component: Component<{ - icon?: string; - coverImage?: string; - title?: string; - subtitle?: string; - description?: string; - callToActionText?: string; - socialContext?: string; - }>): Component<{ adsManager: NativeAdsManager }, { ad: any, canRequestAds: boolean }>; - - /** - * Banner View - */ - type AdType = 'large' | 'rectangle' | 'standard'; - - interface BannerViewProps { - type: AdType; - placementId: string; - onPress: () => void; - onError: () => void; - } - - class BannerView extends Component { } - - /** - * Ad Settings - */ - namespace AdSettings { - const currentDeviceHash: string; - function addTestDevice(device: string): void; - function clearTestDevices(): void; - type SDKLogLevel = 'none' | 'debug' | 'verbose' | 'warning' | 'error' | 'notification'; - function setLogLevel(logLevel: SDKLogLevel): void; - function setIsChildDirected(isDirected: boolean): void; - function setMediationService(mediationService: string): void; - function setUrlPrefix(urlPrefix: string): void; - } -} - -/** - * FileSystem - */ -export namespace FileSystem { - type FileInfo = { - exists: true; - isDirectory: boolean; - uri: string; - size: number; - modificationTime: number; - md5?: Md5; - } | { - exists: false; - isDirectory: false; - }; - - interface DownloadResult { - uri: string; - status: number; - headers: { [name: string]: string }; - md5?: Md5; - } - - const documentDirectory: string; - const cacheDirectory: string; - - function getInfoAsync(fileUri: string, options?: { md5?: string, size?: boolean; }): Promise; - function readAsStringAsync(fileUri: string): Promise; - function writeAsStringAsync(fileUri: string, contents: string): Promise; - function deleteAsync(fileUri: string, options?: { idempotent: boolean; }): Promise; - function moveAsync(options: { from: string, to: string; }): Promise; - function copyAsync(options: { from: string, to: string; }): Promise; - function makeDirectoryAsync(dirUri: string, options?: { intermediates: boolean }): Promise; - function readDirectoryAsync(dirUri: string): Promise; - function downloadAsync(uri: string, fileUri: string, options?: { md5?: boolean; }): Promise; - function createDownloadResumable( - uri: string, - fileUri: string, - options?: DownloadOptions, - callback?: (totalBytesWritten: number, totalBytesExpectedToWrite: number) => void, - resumeData?: string | null - ): DownloadResumable; - - interface PauseResult { - url: string; - fileUri: string; - options: { md5: boolean; }; - resumeData: string; - } - - interface DownloadOptions { - md5?: boolean; - headers?: { [name: string]: string }; - } - - interface DownloadProgressData { - totalBytesWritten: number; - totalBytesExpectedToWrite: number; - } - - type DownloadProgressCallback = (data: DownloadProgressData) => void; - - class DownloadResumable { - constructor( - url: string, - fileUri: string, - options: DownloadOptions, - callback?: DownloadProgressCallback, - resumeData?: string - ); - - downloadAsync(): Promise; - pauseAsync(): Promise; - resumeAsync(): Promise; - savable(): PauseResult; - } -} - -/** Use TouchID/FaceID (iOS) or the Fingerprint API (Android) to authenticate the user with a fingerprint scan. */ -export namespace Fingerprint { - type FingerprintAuthenticationResult = { - success: true - } | { - success: false, - - /** Error code in the case where authentication fails. */ - error: string - }; - - /** Determine whether the Fingerprint scanner is available on the device. */ - function hasHardwareAsync(): Promise; - - /** Determine whether the device has saved fingerprints to use for authentication. */ - function isEnrolledAsync(): Promise; - - /** - * Attempts to authenticate via Fingerprint. Android: When using the fingerprint module on Android, you need to provide a UI component to prompt the user to scan their fingerprint, as the OS has no default alert for it. + * Provides basic sample playback and recording. * - * @param promptMessage A message that is shown alongside the TouchID/FaceID prompt. (iOS only) + * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. */ - function authenticateAsync(promptMessageIOS?: string): Promise; + export namespace Audio { + enum InterruptionModeIos { + /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ + INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, - /** Cancels the fingerprint authentication flow. (Android only) */ - function cancelAuthenticate(): void; -} + /** If this option is set, your experience’s audio interrupts audio from other apps. */ + INTERRUPTION_MODE_IOS_DO_NOT_MIX = 1, -/** - * Font - */ -export namespace Font { - interface FontMap { - [name: string]: RequireSource; - } - - function loadAsync(name: string, url: string): Promise; - function loadAsync(map: FontMap): Promise; -} - -/** - * GLView - */ -export interface GLViewProps extends ViewProperties { - onContextCreate(): void; - msaaSamples: number; -} -export class GLView extends Component { } - -/** - * Google - */ -export namespace Google { - interface LogInConfig { - androidClientId?: string; - androidStandaloneAppClientId?: string; - iosClientId?: string; - iosStandaloneAppClientId?: string; - webClientId?: string; - behavior?: 'system' | 'web'; - scopes?: string[]; - } - - type LogInResult = { - type: 'cancel'; - } | { - type: 'success'; - accessToken: string; - idToken?: string; - refreshToken?: string; - serverAuthCode?: string; - user: { - id: string; - name: string; - givenName: string; - familyName: string; - photoUrl?: string; - email?: string; + /** If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ + INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 } - }; - function logInAsync(config: LogInConfig): Promise; -} + const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; + const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; -/** Access the device gyroscope sensor to respond to changes in rotation in 3d space. */ -export namespace Gyroscope { - interface GyroscopeObject { - x: Axis; - y: Axis; - z: Axis; + enum InterruptionModeAndroid { + /** If this option is set, your experience’s audio interrupts audio from other apps. */ + INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, + + /** This is the default option. If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ + INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 + } + + const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; + + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; + + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; + + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; + + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; + + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; + + type RecordingStatus = { + canRecord: false, + isDoneRecording: false + } | { + canRecord: true, + isRecording: boolean, + durationMillis: number + } | { + canRecord: false, + isDoneRecording: true, + durationMillis: number + }; + + const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; + const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; + + interface RecordingOptions { + android: { + extension: string; + outputFormat: number; + audioEncoder: number; + sampleRate?: number; + numberOfChannels?: number; + bitRate?: number; + maxFileSize?: number; + }; + ios: { + extension: string; + outputFormat?: string | number; + audioQuality: number; + sampleRate: number; + numberOfChannels: number; + bitRate: number; + bitRateStrategy?: number; + bitDepthHint?: number; + linearPCMBitDepth?: number; + linearPCMIsBigEndian?: boolean; + linearPCMIsFloat?: boolean; + }; + } + + interface AudioMode { + /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ + playsInSilentModeIOS: boolean; + + /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ + allowsRecordingIOS: boolean; + + /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ + interruptionModeIOS: InterruptionModeIos; + + /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ + shouldDuckAndroid: boolean; + + /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ + interruptionModeAndroid: InterruptionModeAndroid; + } + + function setIsEnabledAsync(value: boolean): Promise; + function setAudioModeAsync(mode: AudioMode): Promise; + + /** This class represents a sound corresponding to an Asset or URL. */ + class Sound extends PlaybackObject { + constructor(); + + /** + * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. + * + * @returns A `Promise` that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: The newly created and loaded Sound object. + * - `status`: The PlaybackStatus of the Sound object. See the AV documentation for further information. + */ + static create( + /** + * The source of the sound. The following forms are supported: + * + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to an audio file on the web. + * - `require('path/to/file')` for an audio file asset in the source code directory. + * - An `Expo.Asset` object for an audio file asset. + */ + source: PlaybackSource, + + /** The initial intended PlaybackStatusToSet of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, + + /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ + downloadFirst?: boolean + ): Promise<{ sound: Sound, status: PlaybackStatus }>; + } + + class Recording { + constructor(); + + /** Gets the `status` of the `Recording`. */ + getStatusAsync(): Promise; + + /** Sets a function to be called regularly with the `status` of the `Recording`. */ + setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void; + + /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ + setProgressUpdateInterval(progressUpdateIntervalMillis: number): void; + + /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ + prepareToRecordAsync( + /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ + options?: RecordingOptions + ): Promise; + + /** Begins recording. This method can only be called if the `Recording` has been prepared. */ + startAsync(): Promise; + + /** + * Pauses recording. This method can only be called if the Recording has been prepared. + * + * NOTE: This is only available on Android API version 24 and later. + */ + pauseAsync(): Promise; + + /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ + stopAndUnloadAsync(): Promise; + + /** + * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. + * + * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. + */ + getURI(): string | null | undefined; + + /** + * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). + * + * @returns A Promise that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: the newly created and loaded Sound object. + * - `status`: the PlaybackStatus of the Sound object. + */ + createNewLoadedSound( + /** The initial intended `PlaybackStatusToSet` of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null + ): Promise<{ sound: Sound, status: PlaybackStatus }>; + } } - /** A callback that is invoked when an gyroscope update is available. */ - function addListener(listener: (obj: GyroscopeObject) => any): EventSubscription; + /** + * Expo Video + */ + export interface NaturalSize { + width: number; + height: number; + orientation: Orientation; + } - /** Remove all listeners. */ - function removeAllListeners(): void; + export interface ReadyForDisplayEvent { + naturalSize: NaturalSize; + status: PlaybackStatus; + } - /** Subscribe for updates to the gyroscope. */ - function setUpdateInterval(intervalMs: number): void; -} + export enum FullscreenUpdateVariants { + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 + } -/** - * Image Picker - */ -export namespace ImagePicker { - interface ImageInfo { + export interface FullscreenUpdateEvent { + fullscreenUpdate: FullscreenUpdateVariants; + status: PlaybackStatus; + } + + export interface VideoProps { + source?: PlaybackSource | null; + posterSource?: URISource | RequireSource; + + resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; + useNativeControls?: boolean; + usePoster?: boolean; + + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; + onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; + onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; + + onLoadStart?: () => void; + onLoad?: (status: PlaybackStatus) => void; + onError?: (error: string) => void; + + status?: PlaybackStatusToSet; + progressUpdateIntervalMillis?: number; + positionMillis?: number; + shouldPlay?: boolean; + rate?: number; + shouldCorrectPitch?: boolean; + volume?: number; + isMuted?: boolean; + isLooping?: boolean; + + scaleX?: number; + scaleY?: number; + translateX?: number; + translateY?: number; + rotation?: number; + ref?: Ref; + } + + export interface VideoState { + showPoster: boolean; + } + + export class Video extends Component { + static RESIZE_MODE_CONTAIN: ResizeModeContain; + static RESIZE_MODE_COVER: ResizeModeCover; + static RESIZE_MODE_STRETCH: ResizeModeStretch; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; + } + + /** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ + export type AppLoadingProps = { + /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ + startAsync: () => Promise; + + /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ + onFinish: () => void; + + /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ + onError?: (error: Error) => void; + } | { + startAsync: null; + onFinish: null; + onError?: null; + }; + + /** + * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. + * + * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. + */ + export class AppLoading extends Component { } + + /** + * BarCodeScanner + */ + export interface BarCodeScannerProps extends ViewProperties { + type?: 'front' | 'back'; + torchMode?: 'on' | 'off'; + barCodeTypes?: string[]; + onBarCodeRead?: BarCodeReadCallback; + } + + export class BarCodeScanner extends Component { } + + /** + * BlurView + */ + export interface BlurViewProps extends ViewProperties { + tint: 'light' | 'default' | 'dark'; + intensity: number; + } + export class BlurView extends Component { } + + /** + * Brightness + */ + export namespace Brightness { + function setBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; + function getBrightnessAsync(): Promise; + function getSystemBrightnessAsync(): Promise; + function setSystemBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; + } + + /** + * Camera + */ + interface PictureOptions { + quality?: number; + } + export interface PictureResponse { uri: string; width: number; height: number; + exif: string; + base64: string; + } + export interface RecordingOptions { + quality?: string | number; + maxDuration?: number; + maxFileSize?: number; + } + export class CameraObject { + takePictureAsync(options: PictureOptions): Promise; + recordAsync(options: RecordingOptions): Promise<{ uri: string; }>; + stopRecording(): void; + getSupportedRatiosAsync(): Promise; // Android only + } + export interface CameraProps extends ViewProperties { + flashMode?: string | number; + type?: string | number; + ratio?: string; + autoFocus?: string | number | boolean; + focusDepth?: FloatFromZeroToOne; + zoom?: FloatFromZeroToOne; + whiteBalance?: string | number; + barCodeTypes?: string[]; + onCameraReady?: () => void; + onMountError?: () => void; + onBarCodeRead?: BarCodeReadCallback; + ref?: Ref; + } + interface CameraConstants { + readonly Type: string; + readonly FlashMode: string; + readonly AutoFocus: string; + readonly WhiteBalance: string; + readonly VideoQuality: string; + readonly BarCodeType: string; + } + export class Camera extends Component { + static readonly Constants: CameraConstants; } - type ImageResult = { cancelled: true } | ({ cancelled: false } & ImageInfo); + /** + * Constants + */ + export namespace Constants { + const appOwnership: 'expo' | 'standalone' | 'guest'; + const expoVersion: string; + const deviceId: string; + const deviceName: string; + const deviceYearClass: number; + const isDevice: boolean; - interface _MediaTypeOptions { - All: 'All'; - Videos: 'Videos'; - Images: 'Images'; - } + interface Platform { + ios: { + platform: string; + model: string; + userInterfaceIdiom: string; + }; + } + const platform: Platform; + const sessionId: string; + const statusBarHeight: number; + const systemFonts: string[]; - const MediaTypeOptions: _MediaTypeOptions; - - interface ImageLibraryOptions { - allowsEditing?: boolean; - aspect?: [number, number]; - quality?: number; - mediaTypes?: keyof _MediaTypeOptions; - } - - function launchImageLibraryAsync(options?: ImageLibraryOptions): Promise; - - interface CameraOptions { - allowsEditing?: boolean; - aspect?: [number, number]; - quality?: number; - } - function launchCameraAsync(options?: CameraOptions): Promise; -} - -/** - * IntentLauncherAndroid - */ -export namespace IntentLauncherAndroid { - const ACTION_ACCESSIBILITY_SETTINGS: string; - const ACTION_APP_NOTIFICATION_REDACTION: string; - const ACTION_CONDITION_PROVIDER_SETTINGS: string; - const ACTION_NOTIFICATION_LISTENER_SETTINGS: string; - const ACTION_PRINT_SETTINGS: string; - const ACTION_ADD_ACCOUNT_SETTINGS: string; - const ACTION_AIRPLANE_MODE_SETTINGS: string; - const ACTION_APN_SETTINGS: string; - const ACTION_APPLICATION_DETAILS_SETTINGS: string; - const ACTION_APPLICATION_DEVELOPMENT_SETTINGS: string; - const ACTION_APPLICATION_SETTINGS: string; - const ACTION_APP_NOTIFICATION_SETTINGS: string; - const ACTION_APP_OPS_SETTINGS: string; - const ACTION_BATTERY_SAVER_SETTINGS: string; - const ACTION_BLUETOOTH_SETTINGS: string; - const ACTION_CAPTIONING_SETTINGS: string; - const ACTION_CAST_SETTINGS: string; - const ACTION_DATA_ROAMING_SETTINGS: string; - const ACTION_DATE_SETTINGS: string; - const ACTION_DEVICE_INFO_SETTINGS: string; - const ACTION_DEVICE_NAME: string; - const ACTION_DISPLAY_SETTINGS: string; - const ACTION_DREAM_SETTINGS: string; - const ACTION_HARD_KEYBOARD_SETTINGS: string; - const ACTION_HOME_SETTINGS: string; - const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS: string; - const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS: string; - const ACTION_INPUT_METHOD_SETTINGS: string; - const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS: string; - const ACTION_INTERNAL_STORAGE_SETTINGS: string; - const ACTION_LOCALE_SETTINGS: string; - const ACTION_LOCATION_SOURCE_SETTINGS: string; - const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS: string; - const ACTION_MANAGE_APPLICATIONS_SETTINGS: string; - const ACTION_MANAGE_DEFAULT_APPS_SETTINGS: string; - const ACTION_MEMORY_CARD_SETTINGS: string; - const ACTION_MONITORING_CERT_INFO: string; - const ACTION_NETWORK_OPERATOR_SETTINGS: string; - const ACTION_NFCSHARING_SETTINGS: string; - const ACTION_NFC_PAYMENT_SETTINGS: string; - const ACTION_NFC_SETTINGS: string; - const ACTION_NIGHT_DISPLAY_SETTINGS: string; - const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS: string; - const ACTION_NOTIFICATION_SETTINGS: string; - const ACTION_PAIRING_SETTINGS: string; - const ACTION_PRIVACY_SETTINGS: string; - const ACTION_QUICK_LAUNCH_SETTINGS: string; - const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: string; - const ACTION_SECURITY_SETTINGS: string; - const ACTION_SETTINGS: string; - const ACTION_SHOW_ADMIN_SUPPORT_DETAILS: string; - const ACTION_SHOW_INPUT_METHOD_PICKER: string; - const ACTION_SHOW_REGULATORY_INFO: string; - const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG: string; - const ACTION_SOUND_SETTINGS: string; - const ACTION_STORAGE_MANAGER_SETTINGS: string; - const ACTION_SYNC_SETTINGS: string; - const ACTION_SYSTEM_UPDATE_SETTINGS: string; - const ACTION_TETHER_PROVISIONING_UI: string; - const ACTION_TRUSTED_CREDENTIALS_USER: string; - const ACTION_USAGE_ACCESS_SETTINGS: string; - const ACTION_USER_DICTIONARY_INSERT: string; - const ACTION_USER_DICTIONARY_SETTINGS: string; - const ACTION_USER_SETTINGS: string; - const ACTION_VOICE_CONTROL_AIRPLANE_MODE: string; - const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE: string; - const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE: string; - const ACTION_VOICE_INPUT_SETTINGS: string; - const ACTION_VPN_SETTINGS: string; - const ACTION_VR_LISTENER_SETTINGS: string; - const ACTION_WEBVIEW_SETTINGS: string; - const ACTION_WIFI_IP_SETTINGS: string; - const ACTION_WIFI_SETTINGS: string; - const ACTION_WIRELESS_SETTINGS: string; - const ACTION_ZEN_MODE_AUTOMATION_SETTINGS: string; - const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_PRIORITY_SETTINGS: string; - const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_SETTINGS: string; - - function startActivityAsync(activity: string, data?: HashMap): Promise; -} - -/** - * KeepAwake - */ -export class KeepAwake extends Component { - static activate(): void; - static deactivate(): void; -} - -/** - * LinearGradient - */ -export interface LinearGradientProps { - colors: string[]; - start: [number, number]; - end: [number, number]; - locations: number[]; -} - -export class LinearGradient extends Component { } - -/** - * Location - */ -export namespace Location { - interface LocationOptions { - enableHighAccuracy?: boolean; - timeInterval?: number; - distanceInterval?: number; - } - - interface LocationProps { - latitude: number; - longitude: number; - } - - interface Coords extends LocationProps { - altitude: number; - accuracy: number; - } - - interface LocationData { - coords: { - heading: number; - speed: number - } & Coords; - timestamp: number; - } - - interface ProviderStatus { - locationServicesEnabled: boolean; - gpsAvailable?: boolean; - networkAvailable?: boolean; - passiveAvailable?: boolean; - } - - interface HeadingStatus { - magHeading: number; - trueHeading: number; - accuracy: number; - } - - interface GeocodeData { - city: string; - street: string; - region: string; - postalCode: string; - country: string; - name: string; - } - - type LocationCallback = (data: LocationData) => void; - - function getCurrentPositionAsync(options: LocationOptions): Promise; - function watchPositionAsync(options: LocationOptions, callback: LocationCallback): EventSubscription; - function getProviderStatusAsync(): Promise; - function getHeadingAsync(): Promise; - function watchHeadingAsync(callback: (status: HeadingStatus) => void): EventSubscription; - function geocodeAsync(address: string): Promise; - function reverseGeocodeAsync(location: LocationProps): Promise; - function setApiKey(key: string): void; -} - -/** - * Magnetometer - */ -export namespace Magnetometer { - interface MagnetometerObject { - x: Axis; - y: Axis; - z: Axis; - } - - function addListener(listener: (obj: MagnetometerObject) => any): EventSubscription; - function removeAllListeners(): void; - function setUpdateInterval(intervalMs: number): void; -} - -/** - * Notifications - */ -export namespace Notifications { - interface Notification { - origin: 'selected' | 'received'; - data: any; - remote: boolean; - isMultiple: boolean; - } - - interface LocalNotification { - title: string; - body?: string; - data?: any; - ios?: { - sound?: boolean - }; - android?: { - sound?: boolean; + interface Manifest { + name: string; + description?: string; + slug?: string; + sdkVersion?: string; + version?: string; + orientation?: Orientation; + primaryColor?: string; + privacy?: 'public' | 'unlisted'; + scheme?: string; icon?: string; - color?: string; - priority?: 'min' | 'low' | 'high' | 'max'; - sticky?: boolean; - vibrate?: boolean | number[]; - link?: string; - }; + platforms?: string[]; + githubUrl?: string; + notification?: { + icon?: string, + color?: string, + androidMode?: 'default' | 'collapse', + androidCollapsedTitle?: string + }; + loading?: { + icon?: string, + exponentIconColor?: 'white' | 'blue', + exponentIconGrayscale?: 1 | 0, + backgroundImage?: string, + backgroundColor?: string, + hideExponentText?: boolean + }; + appKey?: string; + androidStatusBar?: { + barStyle?: 'lignt-content' | 'dark-content', + backgroundColor?: string + }; + androidShowExponentNotificationInShellApp?: boolean; + extra?: { + [propName: string]: any + }; + rnCliPath?: any; + entryPoint?: string; + packagerOpts?: { + hostType?: string, + dev?: boolean, + strict?: boolean, + minify?: boolean, + urlType?: string, + urlRandomness?: string, + lanType?: string, + [propName: string]: any + }; + ignoreNodeModulesValidation?: any; + nodeModulesPath?: string; + ios?: { + bundleIdentifier?: string, + buildNumber?: string, + config?: { + usesNonExemptEncryption?: boolean, + googleSignIn?: { + reservedClientId: string + } + }, + supportsTablet?: boolean, + infoPlist?: any + }; + android?: { + package?: string, + versionCode?: string, + config?: { + fabric?: { + apiKey: string, + buildSecret: string + }, + googleMaps?: { + apiKey: string + }, + googleSignIn?: { + apiKey: string, + certificateHash: string + } + } + }; + facebookScheme?: any; + facebookAppId?: string; + facebookDisplayName?: string; + splash?: { + backgroundColor?: string; + resizeMode?: ResizeModeContain | ResizeModeCover; + image?: string; + }; + assetBundlePatterns?: string[]; + releaseChannel: string; + [propName: string]: any; + } + const manifest: Manifest; + const linkingUri: string; } - type LocalNotificationId = string | number; + /** + * Contacts + */ + export namespace Contacts { + type PhoneNumbers = 'phoneNumbers'; + type Emails = 'emails'; + type Addresses = 'addresses'; + type Image = 'image'; + type Thumbnail = 'thumbnail'; + type Note = 'note'; + type Birthday = 'birthday'; + type NonGregorianBirthday = 'nonGregorianBirthday'; + type NamePrefix = 'namePrefix'; + type NameSuffix = 'nameSuffix'; + type PhoneticFirstName = 'phoneticFirstName'; + type PhoneticMiddleName = 'phoneticMiddleName'; + type PhoneticLastName = 'phoneticLastName'; + type SocialProfiles = 'socialProfiles'; + type InstantMessageAddresses = 'instantMessageAddresses'; + type UrlAddresses = 'urlAddresses'; + type Dates = 'dates'; + type Relationships = 'relationships'; - function addListener(listener: (notification: Notification) => any): EventSubscription; - function getExponentPushTokenAsync(): Promise; - function presentLocalNotificationAsync(localNotification: LocalNotification): Promise; - function scheduleLocalNotificationAsync( - localNotification: LocalNotification, - schedulingOptions: { time: Date | number, repeat?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year' } - ): Promise; - function dismissNotificationAsync(localNotificationId: LocalNotificationId): Promise; - function dismissAllNotificationsAsync(): Promise; - function cancelScheduledNotificationAsync(localNotificationId: LocalNotificationId): Promise; - function cancelAllScheduledNotificationsAsync(): Promise; - function getBadgeNumberAsync(): Promise; - function setBadgeNumberAsync(number: number): Promise; -} + const PHONE_NUMBERS: PhoneNumbers; + const EMAILS: Emails; + const ADDRESSES: Addresses; + const IMAGE: Image; + const THUMBNAIL: Thumbnail; + const NOTE: Note; + const BIRTHDAY: Birthday; + const NON_GREGORIAN_BIRTHDAY: NonGregorianBirthday; + const NAME_PREFIX: NamePrefix; + const NAME_SUFFIX: NameSuffix; + const PHONETIC_FIRST_NAME: PhoneticFirstName; + const PHONETIC_MIDDLE_NAME: PhoneticMiddleName; + const PHONETIC_LAST_NAME: PhoneticLastName; + const SOCIAL_PROFILES: SocialProfiles; + const IM_ADDRESSES: InstantMessageAddresses; + const URLS: UrlAddresses; + const DATES: Dates; + const RELATIONSHIPS: Relationships; -/** - * Pedometer - */ -export namespace Pedometer { - function isAvailableAsync(): Promise; - function getStepCountAsync(start: Date, end: Date): Promise<{ steps: number; }>; - function watchStepCount(callback: (params: { steps: number; }) => void): EventSubscription; -} + type FieldType = PhoneNumbers | Emails | Addresses | Image | Thumbnail | + Note | Birthday | NonGregorianBirthday | NamePrefix | NameSuffix | + PhoneticFirstName | PhoneticMiddleName | PhoneticLastName | SocialProfiles | + InstantMessageAddresses | UrlAddresses | Dates | Relationships; -/** - * Permissions - */ -export namespace Permissions { - type PermissionType = 'remoteNotifications' | 'location' | - 'camera' | 'contacts' | 'audioRecording'; - type PermissionStatus = 'undetermined' | 'granted' | 'denied'; - type PermissionExpires = 'never'; - interface PermissionDetailsLocationIOS { - scope: 'whenInUse' | 'always'; - } - interface PermissionDetailsLocationAndroid { - scope: 'fine' | 'coarse' | 'none'; - } - interface PermissionResponse { - status: PermissionStatus; - expires: PermissionExpires; - ios?: PermissionDetailsLocationIOS; - android?: PermissionDetailsLocationAndroid; + interface Options { + pageSize?: number; + pageOffset?: number; + fields?: FieldType[]; + } + + interface Contact { + id: string; + contactType: string; + name: string; + firstName?: string; + middleName?: string; + lastName?: string; + previousLastName?: string; + namePrefix?: string; + nameSuffix?: string; + nickname?: string; + phoneticFirstName?: string; + phoneticMiddleName?: string; + phoneticLastName?: string; + emails?: Array<{ + email?: string; + primary?: boolean; + label: string; + id: string; + }>; + phoneNumbers?: Array<{ + number?: string; + primary?: boolean; + digits?: string; + countryCode?: string; + label: string; + id: string; + }>; + addresses?: Array<{ + street?: string; + city?: string; + country?: string; + region?: string; + neighborhood?: string; + postalCode?: string; + poBox?: string; + isoCountryCode?: string; + label: string; + id: string; + }>; + socialProfiles?: Array<{ + service?: string; + localizedProfile?: string; + url?: string; + username?: string; + userId?: string; + label: string; + id: string; + }>; + instantMessageAddresses?: Array<{ + service?: string; + username?: string; + localizedService?: string; + label: string; + id: string; + }>; + urls?: { + label: string; + url?: string; + id: string; + }; + company?: string; + jobTitle?: string; + department?: string; + imageAvailable?: boolean; + image?: { + uri?: string; + }; + thumbnail?: { + uri?: string; + }; + note?: string; + dates?: Array<{ + day?: number; + month?: number; + year?: number; + id: string; + label: string; + }>; + relationships?: Array<{ + label: string; + name?: string; + id: string; + }>; + } + + interface Response { + data: Contact[]; + total: number; + hasNextPage: boolean; + hasPreviousPage: boolean; + } + + function getContactsAsync(options: Options): Promise; + function getContactByIdAsync(options: { id?: string; fields?: FieldType[] }): Promise; } - function getAsync(type: PermissionType): Promise; - function askAsync(type: PermissionType): Promise; + /** + * DocumentPicker + */ + export namespace DocumentPicker { + interface Options { + type?: string; + } + type Response = { + type: 'success'; + uri: string; + name: string; + size: number; + } | { + type: 'cancel'; + }; - const CAMERA: string; - const CAMERA_ROLL: string; - const AUDIO_RECORDING: string; - const LOCATION: string; - const REMOTE_NOTIFICATIONS: string; - const NOTIFICATIONS: string; - const CONTACTS: string; -} - -/** - * Register Root Component - */ -export function registerRootComponent(component: Component): Component; - -/** - * ScreenOrientation - */ -export namespace ScreenOrientation { - interface Orientation { - ALL: 'ALL'; - ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN'; - PORTRAIT: 'PORTRAIT'; - PORTRAIT_UP: 'PORTRAIT_UP'; - PORTRAIT_DOWN: 'PORTRAIT_DOWN'; - LANDSCAPE: 'LANDSCAPE'; - LANDSCAPE_LEFT: 'LANDSCAPE_LEFT'; - LANDSCAPE_RIGHT: 'LANDSCAPE_RIGHT'; - } - const Orientation: Orientation; - function allow(orientation: string): void; -} - -/** - * SecureStore - */ -export namespace SecureStore { - interface SecureStoreOptions { - keychainService?: string; - keychainAccessible?: number; - } - function setItemAsync(key: string, value: string, options?: SecureStoreOptions): Promise; - function getItemAsync(key: string, options?: SecureStoreOptions): Promise; - function deleteItemAsync(key: string, options?: SecureStoreOptions): Promise; -} - -/** - * Segment - */ -export namespace Segment { - function initialize(keys: { - androidWriteKey: string; - iosWriteKey: string; - }): void; - function identify(userId: string): void; - function identifyWithTraits(userId: string, traits: object): void; - function track(event: string): void; - function reset(): void; - function trackWithProperties(event: string, properties: object): void; - function screen(screenName: string): void; - function screenWithProperties(screenName: string, properties: object): void; - function flush(): void; -} - -/** - * Speech - */ -export namespace Speech { - interface SpeechOptions { - language?: string; - pitch?: number; - rate?: number; - onStart?: () => void; - onStopped?: () => void; - onDone?: () => void; - onError?: (error: string) => void; + function getDocumentAsync(options?: Options): Promise; } - function speak(text: string, options?: SpeechOptions): void; - function stop(): void; - function isSpeakingAsync(): Promise; -} - -/** - * SQLite - */ -export namespace SQLite { - type Error = any; - - interface Database { - transaction( - callback: (transaction: Transaction) => any, - error?: (error: Error) => any, // TODO def of error - success?: () => any - ): void; + /** + * ErrorRecovery + */ + export namespace ErrorRecovery { + function setRecoveryProps(props: HashMap): void; } - interface Transaction { - executeSql( - sqlStatement: string, - arguments?: string[] | number[], - success?: (transaction: Transaction, resultSet: ResultSet) => any, - error?: (transaction: Transaction, error: Error) => any - ): void; + /** + * Facebook + */ + export namespace Facebook { + interface Options { + permissions?: string[]; + behavior?: 'web' | 'native' | 'browser' | 'system'; + } + type Response = { + type: 'success'; + token: string; + expires: number; + } | { + type: 'cancel'; + }; + function logInWithReadPermissionsAsync(appId: string, options?: Options): Promise; } - interface ResultSet { - insertId: number; - rowAffected: number; - rows: { - length: number; - item: (index: number) => any; - _array: HashMap[]; - }; + /** + * Facebook Ads + */ + export namespace FacebookAds { + /** + * Interstitial Ads + */ + namespace InterstitialAdManager { + function showAd(placementId: string): Promise; + } + + /** + * Native Ads + */ + type MediaCachePolicy = 'none' | 'icon' | 'image' | 'all'; + class NativeAdsManager { + constructor(placementId: string, numberOfAdsToRequest?: number); + disableAutoRefresh(): void; + setMediaCachePolicy(cachePolicy: MediaCachePolicy): void; + } + + function withNativeAd(component: Component<{ + icon?: string; + coverImage?: string; + title?: string; + subtitle?: string; + description?: string; + callToActionText?: string; + socialContext?: string; + }>): Component<{ adsManager: NativeAdsManager }, { ad: any, canRequestAds: boolean }>; + + /** + * Banner View + */ + type AdType = 'large' | 'rectangle' | 'standard'; + + interface BannerViewProps { + type: AdType; + placementId: string; + onPress: () => void; + onError: () => void; + } + + class BannerView extends Component { } + + /** + * Ad Settings + */ + namespace AdSettings { + const currentDeviceHash: string; + function addTestDevice(device: string): void; + function clearTestDevices(): void; + type SDKLogLevel = 'none' | 'debug' | 'verbose' | 'warning' | 'error' | 'notification'; + function setLogLevel(logLevel: SDKLogLevel): void; + function setIsChildDirected(isDirected: boolean): void; + function setMediationService(mediationService: string): void; + function setUrlPrefix(urlPrefix: string): void; + } } - function openDatabase( - name: string | { - name: string, + /** + * FileSystem + */ + export namespace FileSystem { + type FileInfo = { + exists: true; + isDirectory: boolean; + uri: string; + size: number; + modificationTime: number; + md5?: Md5; + } | { + exists: false; + isDirectory: false; + }; + + interface DownloadResult { + uri: string; + status: number; + headers: { [name: string]: string }; + md5?: Md5; + } + + const documentDirectory: string; + const cacheDirectory: string; + + function getInfoAsync(fileUri: string, options?: { md5?: string, size?: boolean; }): Promise; + function readAsStringAsync(fileUri: string): Promise; + function writeAsStringAsync(fileUri: string, contents: string): Promise; + function deleteAsync(fileUri: string, options?: { idempotent: boolean; }): Promise; + function moveAsync(options: { from: string, to: string; }): Promise; + function copyAsync(options: { from: string, to: string; }): Promise; + function makeDirectoryAsync(dirUri: string, options?: { intermediates: boolean }): Promise; + function readDirectoryAsync(dirUri: string): Promise; + function downloadAsync(uri: string, fileUri: string, options?: { md5?: boolean; }): Promise; + function createDownloadResumable( + uri: string, + fileUri: string, + options?: DownloadOptions, + callback?: (totalBytesWritten: number, totalBytesExpectedToWrite: number) => void, + resumeData?: string | null + ): DownloadResumable; + + interface PauseResult { + url: string; + fileUri: string; + options: { md5: boolean; }; + resumeData: string; + } + + interface DownloadOptions { + md5?: boolean; + headers?: { [name: string]: string }; + } + + interface DownloadProgressData { + totalBytesWritten: number; + totalBytesExpectedToWrite: number; + } + + type DownloadProgressCallback = (data: DownloadProgressData) => void; + + class DownloadResumable { + constructor( + url: string, + fileUri: string, + options: DownloadOptions, + callback?: DownloadProgressCallback, + resumeData?: string + ); + + downloadAsync(): Promise; + pauseAsync(): Promise; + resumeAsync(): Promise; + savable(): PauseResult; + } + } + + /** Use TouchID/FaceID (iOS) or the Fingerprint API (Android) to authenticate the user with a fingerprint scan. */ + export namespace Fingerprint { + type FingerprintAuthenticationResult = { + success: true + } | { + success: false, + + /** Error code in the case where authentication fails. */ + error: string + }; + + /** Determine whether the Fingerprint scanner is available on the device. */ + function hasHardwareAsync(): Promise; + + /** Determine whether the device has saved fingerprints to use for authentication. */ + function isEnrolledAsync(): Promise; + + /** + * Attempts to authenticate via Fingerprint. Android: When using the fingerprint module on Android, you need to provide a UI component to prompt the user to scan their fingerprint, as the OS has no default alert for it. + * + * @param promptMessage A message that is shown alongside the TouchID/FaceID prompt. (iOS only) + */ + function authenticateAsync(promptMessageIOS?: string): Promise; + + /** Cancels the fingerprint authentication flow. (Android only) */ + function cancelAuthenticate(): void; + } + + /** + * Font + */ + export namespace Font { + interface FontMap { + [name: string]: RequireSource; + } + + function loadAsync(name: string, url: string): Promise; + function loadAsync(map: FontMap): Promise; + } + + /** + * GLView + */ + export interface GLViewProps extends ViewProperties { + onContextCreate(): void; + msaaSamples: number; + } + export class GLView extends Component { } + + /** + * Google + */ + export namespace Google { + interface LogInConfig { + androidClientId?: string; + androidStandaloneAppClientId?: string; + iosClientId?: string; + iosStandaloneAppClientId?: string; + webClientId?: string; + behavior?: 'system' | 'web'; + scopes?: string[]; + } + + type LogInResult = { + type: 'cancel'; + } | { + type: 'success'; + accessToken: string; + idToken?: string; + refreshToken?: string; + serverAuthCode?: string; + user: { + id: string; + name: string; + givenName: string; + familyName: string; + photoUrl?: string; + email?: string; + } + }; + + function logInAsync(config: LogInConfig): Promise; + } + + /** Access the device gyroscope sensor to respond to changes in rotation in 3d space. */ + export namespace Gyroscope { + interface GyroscopeObject { + x: Axis; + y: Axis; + z: Axis; + } + + /** A callback that is invoked when an gyroscope update is available. */ + function addListener(listener: (obj: GyroscopeObject) => any): EventSubscription; + + /** Remove all listeners. */ + function removeAllListeners(): void; + + /** Subscribe for updates to the gyroscope. */ + function setUpdateInterval(intervalMs: number): void; + } + + /** + * Image Picker + */ + export namespace ImagePicker { + interface ImageInfo { + uri: string; + width: number; + height: number; + } + + type ImageResult = { cancelled: true } | ({ cancelled: false } & ImageInfo); + + interface _MediaTypeOptions { + All: 'All'; + Videos: 'Videos'; + Images: 'Images'; + } + + const MediaTypeOptions: _MediaTypeOptions; + + interface ImageLibraryOptions { + allowsEditing?: boolean; + aspect?: [number, number]; + quality?: number; + mediaTypes?: keyof _MediaTypeOptions; + } + + function launchImageLibraryAsync(options?: ImageLibraryOptions): Promise; + + interface CameraOptions { + allowsEditing?: boolean; + aspect?: [number, number]; + quality?: number; + } + function launchCameraAsync(options?: CameraOptions): Promise; + } + + /** + * IntentLauncherAndroid + */ + export namespace IntentLauncherAndroid { + const ACTION_ACCESSIBILITY_SETTINGS: string; + const ACTION_APP_NOTIFICATION_REDACTION: string; + const ACTION_CONDITION_PROVIDER_SETTINGS: string; + const ACTION_NOTIFICATION_LISTENER_SETTINGS: string; + const ACTION_PRINT_SETTINGS: string; + const ACTION_ADD_ACCOUNT_SETTINGS: string; + const ACTION_AIRPLANE_MODE_SETTINGS: string; + const ACTION_APN_SETTINGS: string; + const ACTION_APPLICATION_DETAILS_SETTINGS: string; + const ACTION_APPLICATION_DEVELOPMENT_SETTINGS: string; + const ACTION_APPLICATION_SETTINGS: string; + const ACTION_APP_NOTIFICATION_SETTINGS: string; + const ACTION_APP_OPS_SETTINGS: string; + const ACTION_BATTERY_SAVER_SETTINGS: string; + const ACTION_BLUETOOTH_SETTINGS: string; + const ACTION_CAPTIONING_SETTINGS: string; + const ACTION_CAST_SETTINGS: string; + const ACTION_DATA_ROAMING_SETTINGS: string; + const ACTION_DATE_SETTINGS: string; + const ACTION_DEVICE_INFO_SETTINGS: string; + const ACTION_DEVICE_NAME: string; + const ACTION_DISPLAY_SETTINGS: string; + const ACTION_DREAM_SETTINGS: string; + const ACTION_HARD_KEYBOARD_SETTINGS: string; + const ACTION_HOME_SETTINGS: string; + const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS: string; + const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS: string; + const ACTION_INPUT_METHOD_SETTINGS: string; + const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS: string; + const ACTION_INTERNAL_STORAGE_SETTINGS: string; + const ACTION_LOCALE_SETTINGS: string; + const ACTION_LOCATION_SOURCE_SETTINGS: string; + const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS: string; + const ACTION_MANAGE_APPLICATIONS_SETTINGS: string; + const ACTION_MANAGE_DEFAULT_APPS_SETTINGS: string; + const ACTION_MEMORY_CARD_SETTINGS: string; + const ACTION_MONITORING_CERT_INFO: string; + const ACTION_NETWORK_OPERATOR_SETTINGS: string; + const ACTION_NFCSHARING_SETTINGS: string; + const ACTION_NFC_PAYMENT_SETTINGS: string; + const ACTION_NFC_SETTINGS: string; + const ACTION_NIGHT_DISPLAY_SETTINGS: string; + const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS: string; + const ACTION_NOTIFICATION_SETTINGS: string; + const ACTION_PAIRING_SETTINGS: string; + const ACTION_PRIVACY_SETTINGS: string; + const ACTION_QUICK_LAUNCH_SETTINGS: string; + const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: string; + const ACTION_SECURITY_SETTINGS: string; + const ACTION_SETTINGS: string; + const ACTION_SHOW_ADMIN_SUPPORT_DETAILS: string; + const ACTION_SHOW_INPUT_METHOD_PICKER: string; + const ACTION_SHOW_REGULATORY_INFO: string; + const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG: string; + const ACTION_SOUND_SETTINGS: string; + const ACTION_STORAGE_MANAGER_SETTINGS: string; + const ACTION_SYNC_SETTINGS: string; + const ACTION_SYSTEM_UPDATE_SETTINGS: string; + const ACTION_TETHER_PROVISIONING_UI: string; + const ACTION_TRUSTED_CREDENTIALS_USER: string; + const ACTION_USAGE_ACCESS_SETTINGS: string; + const ACTION_USER_DICTIONARY_INSERT: string; + const ACTION_USER_DICTIONARY_SETTINGS: string; + const ACTION_USER_SETTINGS: string; + const ACTION_VOICE_CONTROL_AIRPLANE_MODE: string; + const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE: string; + const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE: string; + const ACTION_VOICE_INPUT_SETTINGS: string; + const ACTION_VPN_SETTINGS: string; + const ACTION_VR_LISTENER_SETTINGS: string; + const ACTION_WEBVIEW_SETTINGS: string; + const ACTION_WIFI_IP_SETTINGS: string; + const ACTION_WIFI_SETTINGS: string; + const ACTION_WIRELESS_SETTINGS: string; + const ACTION_ZEN_MODE_AUTOMATION_SETTINGS: string; + const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS: string; + const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS: string; + const ACTION_ZEN_MODE_PRIORITY_SETTINGS: string; + const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS: string; + const ACTION_ZEN_MODE_SETTINGS: string; + + function startActivityAsync(activity: string, data?: HashMap): Promise; + } + + /** + * KeepAwake + */ + export class KeepAwake extends Component { + static activate(): void; + static deactivate(): void; + } + + /** + * LinearGradient + */ + export interface LinearGradientProps { + colors: string[]; + start: [number, number]; + end: [number, number]; + locations: number[]; + } + + export class LinearGradient extends Component { } + + /** + * Location + */ + export namespace Location { + interface LocationOptions { + enableHighAccuracy?: boolean; + timeInterval?: number; + distanceInterval?: number; + } + + interface LocationProps { + latitude: number; + longitude: number; + } + + interface Coords extends LocationProps { + altitude: number; + accuracy: number; + } + + interface LocationData { + coords: { + heading: number; + speed: number + } & Coords; + timestamp: number; + } + + interface ProviderStatus { + locationServicesEnabled: boolean; + gpsAvailable?: boolean; + networkAvailable?: boolean; + passiveAvailable?: boolean; + } + + interface HeadingStatus { + magHeading: number; + trueHeading: number; + accuracy: number; + } + + interface GeocodeData { + city: string; + street: string; + region: string; + postalCode: string; + country: string; + name: string; + } + + type LocationCallback = (data: LocationData) => void; + + function getCurrentPositionAsync(options: LocationOptions): Promise; + function watchPositionAsync(options: LocationOptions, callback: LocationCallback): EventSubscription; + function getProviderStatusAsync(): Promise; + function getHeadingAsync(): Promise; + function watchHeadingAsync(callback: (status: HeadingStatus) => void): EventSubscription; + function geocodeAsync(address: string): Promise; + function reverseGeocodeAsync(location: LocationProps): Promise; + function setApiKey(key: string): void; + } + + /** + * Magnetometer + */ + export namespace Magnetometer { + interface MagnetometerObject { + x: Axis; + y: Axis; + z: Axis; + } + + function addListener(listener: (obj: MagnetometerObject) => any): EventSubscription; + function removeAllListeners(): void; + function setUpdateInterval(intervalMs: number): void; + } + + /** + * Notifications + */ + export namespace Notifications { + interface Notification { + origin: 'selected' | 'received'; + data: any; + remote: boolean; + isMultiple: boolean; + } + + interface LocalNotification { + title: string; + body?: string; + data?: any; + ios?: { + sound?: boolean + }; + android?: { + sound?: boolean; + icon?: string; + color?: string; + priority?: 'min' | 'low' | 'high' | 'max'; + sticky?: boolean; + vibrate?: boolean | number[]; + link?: string; + }; + } + + type LocalNotificationId = string | number; + + function addListener(listener: (notification: Notification) => any): EventSubscription; + function getExponentPushTokenAsync(): Promise; + function presentLocalNotificationAsync(localNotification: LocalNotification): Promise; + function scheduleLocalNotificationAsync( + localNotification: LocalNotification, + schedulingOptions: { time: Date | number, repeat?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year' } + ): Promise; + function dismissNotificationAsync(localNotificationId: LocalNotificationId): Promise; + function dismissAllNotificationsAsync(): Promise; + function cancelScheduledNotificationAsync(localNotificationId: LocalNotificationId): Promise; + function cancelAllScheduledNotificationsAsync(): Promise; + function getBadgeNumberAsync(): Promise; + function setBadgeNumberAsync(number: number): Promise; + } + + /** + * Pedometer + */ + export namespace Pedometer { + function isAvailableAsync(): Promise; + function getStepCountAsync(start: Date, end: Date): Promise<{ steps: number; }>; + function watchStepCount(callback: (params: { steps: number; }) => void): EventSubscription; + } + + /** + * Permissions + */ + export namespace Permissions { + type PermissionType = 'remoteNotifications' | 'location' | + 'camera' | 'contacts' | 'audioRecording'; + type PermissionStatus = 'undetermined' | 'granted' | 'denied'; + type PermissionExpires = 'never'; + interface PermissionDetailsLocationIOS { + scope: 'whenInUse' | 'always'; + } + interface PermissionDetailsLocationAndroid { + scope: 'fine' | 'coarse' | 'none'; + } + interface PermissionResponse { + status: PermissionStatus; + expires: PermissionExpires; + ios?: PermissionDetailsLocationIOS; + android?: PermissionDetailsLocationAndroid; + } + + function getAsync(type: PermissionType): Promise; + function askAsync(type: PermissionType): Promise; + + const CAMERA: string; + const CAMERA_ROLL: string; + const AUDIO_RECORDING: string; + const LOCATION: string; + const REMOTE_NOTIFICATIONS: string; + const NOTIFICATIONS: string; + const CONTACTS: string; + } + + /** + * Register Root Component + */ + export function registerRootComponent(component: Component): Component; + + /** + * ScreenOrientation + */ + export namespace ScreenOrientation { + interface Orientation { + ALL: 'ALL'; + ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN'; + PORTRAIT: 'PORTRAIT'; + PORTRAIT_UP: 'PORTRAIT_UP'; + PORTRAIT_DOWN: 'PORTRAIT_DOWN'; + LANDSCAPE: 'LANDSCAPE'; + LANDSCAPE_LEFT: 'LANDSCAPE_LEFT'; + LANDSCAPE_RIGHT: 'LANDSCAPE_RIGHT'; + } + const Orientation: Orientation; + function allow(orientation: string): void; + } + + /** + * SecureStore + */ + export namespace SecureStore { + interface SecureStoreOptions { + keychainService?: string; + keychainAccessible?: number; + } + function setItemAsync(key: string, value: string, options?: SecureStoreOptions): Promise; + function getItemAsync(key: string, options?: SecureStoreOptions): Promise; + function deleteItemAsync(key: string, options?: SecureStoreOptions): Promise; + } + + /** + * Segment + */ + export namespace Segment { + function initialize(keys: { + androidWriteKey: string; + iosWriteKey: string; + }): void; + function identify(userId: string): void; + function identifyWithTraits(userId: string, traits: object): void; + function track(event: string): void; + function reset(): void; + function trackWithProperties(event: string, properties: object): void; + function screen(screenName: string): void; + function screenWithProperties(screenName: string, properties: object): void; + function flush(): void; + } + + /** + * Speech + */ + export namespace Speech { + interface SpeechOptions { + language?: string; + pitch?: number; + rate?: number; + onStart?: () => void; + onStopped?: () => void; + onDone?: () => void; + onError?: (error: string) => void; + } + + function speak(text: string, options?: SpeechOptions): void; + function stop(): void; + function isSpeakingAsync(): Promise; + } + + /** + * SQLite + */ + export namespace SQLite { + type Error = any; + + interface Database { + transaction( + callback: (transaction: Transaction) => any, + error?: (error: Error) => any, // TODO def of error + success?: () => any + ): void; + } + + interface Transaction { + executeSql( + sqlStatement: string, + arguments?: string[] | number[], + success?: (transaction: Transaction, resultSet: ResultSet) => any, + error?: (transaction: Transaction, error: Error) => any + ): void; + } + + interface ResultSet { + insertId: number; + rowAffected: number; + rows: { + length: number; + item: (index: number) => any; + _array: HashMap[]; + }; + } + + function openDatabase( + name: string | { + name: string, + version?: string, + description?: string, + size?: number, + callback?: () => any + }, version?: string, description?: string, size?: number, callback?: () => any - }, - version?: string, - description?: string, - size?: number, - callback?: () => any - ): any; -} - -/** - * Svg - */ -export interface SvgCommonProps { - fill?: string; - fillOpacity?: number | string; - stroke?: string; - strokeWidth?: number | string; - strokeOpacity?: number | string; - strokeLinecap?: string; - strokeLineJoin?: string; - strokeDasharray?: any[]; - strokeDashoffset?: any; - x?: number | string; - y?: number | string; - rotate?: number | string; - scale?: number | string; - origin?: number | string; - originX?: number | string; - originY?: number | string; - id?: string; - disabled?: boolean; - onPress?: () => any; - onPressIn?: () => any; - onPressOut?: () => any; - onLongPress?: () => any; - delayPressIn?: number; - delayPressOut?: number; - delayLongPress?: number; -} - -export interface SvgRectProps extends SvgCommonProps { - width: number | string; - height: number | string; -} - -export interface SvgCircleProps extends SvgCommonProps { - cx: number | string; - cy: number | string; - r: number | string; -} - -export interface SvgEllipseProps extends SvgCommonProps { - cx: number | string; - cy: number | string; - rx: number | string; - ry: number | string; -} - -export interface SvgLineProps extends SvgCommonProps { - x1: number | string; - y1: number | string; - x2: number | string; - y2: number | string; -} - -export interface SvgPolyProps extends SvgCommonProps { - points: string; -} - -export interface SvgPathProps extends SvgCommonProps { - d: string; -} - -export interface SvgTextProps extends SvgCommonProps { - textAnchor?: string; - fontSize?: number | string; - fontWeight?: string; -} - -export interface SvgTSpanProps extends SvgTextProps { - dx?: string; - dy?: string; -} - -export interface SvgTextPathProps extends SvgCommonProps { - href?: string; - startOffset?: string; -} - -export interface SvgUseProps extends SvgCommonProps { - href: string; - x: number | string; - y: number | string; -} - -export interface SvgSymbolProps extends SvgCommonProps { - viewBox: string; - width: number | string; - height: number | string; -} - -export interface SvgLinearGradientProps extends SvgCommonProps { - x1: number | string; - x2: number | string; - y1: number | string; - y2: number | string; -} - -export interface SvgRadialGradientProps extends SvgCommonProps { - cx: number | string; - cy: number | string; - rx: number | string; - ry: number | string; - fx: number | string; - fy: number | string; - gradientUnits?: string; -} - -export interface SvgStopProps extends SvgCommonProps { - offset?: string; - stopColor?: string; - stopOpacity?: string; -} - -export class Svg extends Component<{ width: number, height: number }> { - static Circle: ComponentClass; - static ClipPath: ComponentClass; - static Defs: ComponentClass<{ }>; - static Ellipse: ComponentClass; - static G: ComponentClass; - static Line: ComponentClass; - static LinearGradient: ComponentClass; - static Path: ComponentClass; - static Polygon: ComponentClass; - static Polyline: ComponentClass; - static RadialGradient: ComponentClass; - static Rect: ComponentClass; - static Stop: ComponentClass; - static Symbol: ComponentClass; - static Text: ComponentClass; - static TextPath: ComponentClass; - static TSpan: ComponentClass; - static Use: ComponentClass; -} - -/** - * Take Snapshot - */ -export function takeSnapshotAsync( - view?: (number | React.ReactElement), - options?: { - width?: number, - height?: number, - format?: 'png' | 'jpg' | 'jpeg' | 'webm', - quality?: number, - result?: 'file' | 'base64' | 'data-uri', + ): any; } -): Promise; -/** Helpful utility functions that don’t fit anywhere else, including some localization and internationalization methods. */ -export namespace Util { - /** Returns the current device country code. */ - function getCurrentDeviceCountryAsync(): Promise; - - /** Returns the current device locale as a string. */ - function getCurrentLocaleAsync(): Promise; - - /** Returns the current device time zone name. */ - function getCurrentTimeZoneAsync(): Promise; - - /** Reloads the current experience. This will fetch and load the newest available JavaScript supported by the device’s Expo environment. This is useful for triggering an update of your experience if you have published a new version. */ - function reload(): void; - - /** _Android only_. Invokes a callback when a new version of your app is successfully downloaded in the background. */ - function addNewVersionListenerExperimental(listener: (event: { - manifest: object; - }) => void): { remove(): void; }; -} - -/** - * Web Browser - */ -export namespace WebBrowser { - function openBrowserAsync(url: string): Promise<{ type: 'cancelled' | 'dismissed' }>; - function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; - function dismissBrowser(): Promise<{ type: 'dismissed' }>; -} - -/** - * ImageManipulator - */ -export namespace ImageManipulator { - interface ImageResult { - uri: string; - width: number; - height: number; - base64?: string; + /** + * Svg + */ + export interface SvgCommonProps { + fill?: string; + fillOpacity?: number | string; + stroke?: string; + strokeWidth?: number | string; + strokeOpacity?: number | string; + strokeLinecap?: string; + strokeLineJoin?: string; + strokeDasharray?: any[]; + strokeDashoffset?: any; + x?: number | string; + y?: number | string; + rotate?: number | string; + scale?: number | string; + origin?: number | string; + originX?: number | string; + originY?: number | string; + id?: string; + disabled?: boolean; + onPress?: () => any; + onPressIn?: () => any; + onPressOut?: () => any; + onLongPress?: () => any; + delayPressIn?: number; + delayPressOut?: number; + delayLongPress?: number; } - interface SaveOptions { - base64?: boolean; - compress?: FloatFromZeroToOne; - format?: 'jpeg' | 'png'; - } - interface CropParameters { - originX: number; - originY: number; - width: number; - height: number; - } - interface ImageManipulationOptions { - resize?: { width?: number; height?: number }; - rotate?: number; - flip?: { vertical?: boolean; horizontal?: boolean }; - crop?: CropParameters; - } - function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; -} -/** - * FaceDetector - */ -export namespace FaceDetector { - interface Point { - x: Axis; - y: Axis; + export interface SvgRectProps extends SvgCommonProps { + width: number | string; + height: number | string; } - interface FaceFeature { - bounds: { - size: { - width: number; - height: number; - }, - origin: Point; - }; - smilingProbability?: number; - leftEarPosition?: Point; - rightEarPosition?: Point; - leftEyePosition?: Point; - leftEyeOpenProbability?: number; - rightEyePosition?: Point; - rightEyeOpenProbability?: number; - leftCheekPosition?: Point; - rightCheekPosition?: Point; - leftMouthPosition?: Point; - mouthPosition?: Point; - rightMouthPosition?: Point; - bottomMouthPosition?: Point; - noseBasePosition?: Point; - yawAngle?: number; - rollAngle?: number; + + export interface SvgCircleProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + r: number | string; } - interface DetectFaceResult { - faces: FaceFeature[]; - image: { + + export interface SvgEllipseProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + rx: number | string; + ry: number | string; + } + + export interface SvgLineProps extends SvgCommonProps { + x1: number | string; + y1: number | string; + x2: number | string; + y2: number | string; + } + + export interface SvgPolyProps extends SvgCommonProps { + points: string; + } + + export interface SvgPathProps extends SvgCommonProps { + d: string; + } + + export interface SvgTextProps extends SvgCommonProps { + textAnchor?: string; + fontSize?: number | string; + fontWeight?: string; + } + + export interface SvgTSpanProps extends SvgTextProps { + dx?: string; + dy?: string; + } + + export interface SvgTextPathProps extends SvgCommonProps { + href?: string; + startOffset?: string; + } + + export interface SvgUseProps extends SvgCommonProps { + href: string; + x: number | string; + y: number | string; + } + + export interface SvgSymbolProps extends SvgCommonProps { + viewBox: string; + width: number | string; + height: number | string; + } + + export interface SvgLinearGradientProps extends SvgCommonProps { + x1: number | string; + x2: number | string; + y1: number | string; + y2: number | string; + } + + export interface SvgRadialGradientProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + rx: number | string; + ry: number | string; + fx: number | string; + fy: number | string; + gradientUnits?: string; + } + + export interface SvgStopProps extends SvgCommonProps { + offset?: string; + stopColor?: string; + stopOpacity?: string; + } + + export class Svg extends Component<{ width: number, height: number }> { + static Circle: ComponentClass; + static ClipPath: ComponentClass; + static Defs: ComponentClass<{}>; + static Ellipse: ComponentClass; + static G: ComponentClass; + static Line: ComponentClass; + static LinearGradient: ComponentClass; + static Path: ComponentClass; + static Polygon: ComponentClass; + static Polyline: ComponentClass; + static RadialGradient: ComponentClass; + static Rect: ComponentClass; + static Stop: ComponentClass; + static Symbol: ComponentClass; + static Text: ComponentClass; + static TextPath: ComponentClass; + static TSpan: ComponentClass; + static Use: ComponentClass; + } + + /** + * Take Snapshot + */ + export function takeSnapshotAsync( + view?: (number | React.ReactElement), + options?: { + width?: number, + height?: number, + format?: 'png' | 'jpg' | 'jpeg' | 'webm', + quality?: number, + result?: 'file' | 'base64' | 'data-uri', + } + ): Promise; + + /** Helpful utility functions that don’t fit anywhere else, including some localization and internationalization methods. */ + export namespace Util { + /** Returns the current device country code. */ + function getCurrentDeviceCountryAsync(): Promise; + + /** Returns the current device locale as a string. */ + function getCurrentLocaleAsync(): Promise; + + /** Returns the current device time zone name. */ + function getCurrentTimeZoneAsync(): Promise; + + /** Reloads the current experience. This will fetch and load the newest available JavaScript supported by the device’s Expo environment. This is useful for triggering an update of your experience if you have published a new version. */ + function reload(): void; + + /** _Android only_. Invokes a callback when a new version of your app is successfully downloaded in the background. */ + function addNewVersionListenerExperimental(listener: (event: { + manifest: object; + }) => void): { remove(): void; }; + } + + /** + * Web Browser + */ + export namespace WebBrowser { + function openBrowserAsync(url: string): Promise<{ type: 'cancelled' | 'dismissed' }>; + function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; + function dismissBrowser(): Promise<{ type: 'dismissed' }>; + } + + /** + * ImageManipulator + */ + export namespace ImageManipulator { + interface ImageResult { uri: string; width: number; height: number; - orientation: number; - }; - } - interface Mode { - fast: 'fast'; - accurate: 'accurate'; - } - interface _Shared { - all: 'all'; - none: 'none'; - } - type Landmarks = _Shared; - type Classifications = _Shared; - interface _Constants { - Mode: Mode; - Landmarks: Landmarks; - Classifications: Classifications; + base64?: string; + } + interface SaveOptions { + base64?: boolean; + compress?: FloatFromZeroToOne; + format?: 'jpeg' | 'png'; + } + interface CropParameters { + originX: number; + originY: number; + width: number; + height: number; + } + interface ImageManipulationOptions { + resize?: { width?: number; height?: number }; + rotate?: number; + flip?: { vertical?: boolean; horizontal?: boolean }; + crop?: CropParameters; + } + function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; } - const Constants: _Constants; + /** + * FaceDetector + */ + export namespace FaceDetector { + interface Point { + x: Axis; + y: Axis; + } + interface FaceFeature { + bounds: { + size: { + width: number; + height: number; + }, + origin: Point; + }; + smilingProbability?: number; + leftEarPosition?: Point; + rightEarPosition?: Point; + leftEyePosition?: Point; + leftEyeOpenProbability?: number; + rightEyePosition?: Point; + rightEyeOpenProbability?: number; + leftCheekPosition?: Point; + rightCheekPosition?: Point; + leftMouthPosition?: Point; + mouthPosition?: Point; + rightMouthPosition?: Point; + bottomMouthPosition?: Point; + noseBasePosition?: Point; + yawAngle?: number; + rollAngle?: number; + } + interface DetectFaceResult { + faces: FaceFeature[]; + image: { + uri: string; + width: number; + height: number; + orientation: number; + }; + } + interface Mode { + fast: 'fast'; + accurate: 'accurate'; + } + interface _Shared { + all: 'all'; + none: 'none'; + } + type Landmarks = _Shared; + type Classifications = _Shared; + interface _Constants { + Mode: Mode; + Landmarks: Landmarks; + Classifications: Classifications; + } - interface DetectionOptions { - mode?: keyof Mode; - detectLandmarks?: keyof Landmarks; - runClassifications?: keyof Classifications; + const Constants: _Constants; + + interface DetectionOptions { + mode?: keyof Mode; + detectLandmarks?: keyof Landmarks; + runClassifications?: keyof Classifications; + } + + function detectFaces(uri: string, options?: DetectionOptions): Promise; } - - function detectFaces(uri: string, options?: DetectionOptions): Promise; -} } From d36981b3d573de2348607c23edc4e83753492d03 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Sat, 20 Jan 2018 13:27:04 +0100 Subject: [PATCH 07/52] Sort imports --- types/expo/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index dc3b57657d..42b0531c5d 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -9,12 +9,12 @@ import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref } from 'react'; import { - ViewStyle, - ViewProperties, ColorPropType, + ImageRequireSource, ImageURISource, NativeEventEmitter, - ImageRequireSource + ViewProperties, + ViewStyle } from 'react-native'; declare module 'expo' { From 5e4d02dbb171a3b104fcac4a6a007546ec611996 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Sat, 20 Jan 2018 13:27:12 +0100 Subject: [PATCH 08/52] Add regions --- types/expo/index.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 42b0531c5d..09c17cf35a 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -165,6 +165,7 @@ declare module 'expo' { function getRedirectUrl(): string; } + // #region AV /** * AV */ @@ -344,6 +345,7 @@ declare module 'expo' { */ unloadAsync(): Promise; } + // #endregion /** * Provides basic sample playback and recording. @@ -590,6 +592,7 @@ declare module 'expo' { } } + // #region Video /** * Expo Video */ @@ -663,7 +666,9 @@ declare module 'expo' { static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; } + // #endregion + // #region AppLoading /** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ export type AppLoadingProps = { /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ @@ -686,7 +691,9 @@ declare module 'expo' { * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. */ export class AppLoading extends Component { } + // #endregion AppLoading + // #region BarCodeScanner /** * BarCodeScanner */ @@ -698,7 +705,9 @@ declare module 'expo' { } export class BarCodeScanner extends Component { } + // #endregion + // #region BlurView /** * BlurView */ @@ -707,6 +716,7 @@ declare module 'expo' { intensity: number; } export class BlurView extends Component { } + // #endregion /** * Brightness @@ -718,6 +728,7 @@ declare module 'expo' { function setSystemBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; } + // #region Camera /** * Camera */ @@ -767,6 +778,7 @@ declare module 'expo' { export class Camera extends Component { static readonly Constants: CameraConstants; } + // #endregion /** * Constants @@ -1258,6 +1270,7 @@ declare module 'expo' { function loadAsync(map: FontMap): Promise; } + // #region GLView /** * GLView */ @@ -1266,6 +1279,7 @@ declare module 'expo' { msaaSamples: number; } export class GLView extends Component { } + // #endregion /** * Google @@ -1453,6 +1467,7 @@ declare module 'expo' { static deactivate(): void; } + // #region LinearGradient /** * LinearGradient */ @@ -1464,6 +1479,7 @@ declare module 'expo' { } export class LinearGradient extends Component { } + // #endregion /** * Location @@ -1751,6 +1767,7 @@ declare module 'expo' { ): any; } + // #region Svg /** * Svg */ @@ -1886,6 +1903,7 @@ declare module 'expo' { static TSpan: ComponentClass; static Use: ComponentClass; } + // #endregion /** * Take Snapshot From 3ff88b5fcbc9f27ecfab83c3921b9e173285be5e Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Sat, 20 Jan 2018 13:35:29 +0100 Subject: [PATCH 09/52] Sort types --- types/expo/index.d.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 09c17cf35a..bfaffa4084 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -18,17 +18,18 @@ import { } from 'react-native'; declare module 'expo' { - type URISource = ImageURISource; + type Axis = number; + type BarCodeReadCallback = (params: { type: string; data: string; }) => void; + type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; + type Md5 = string; + type Orientation = 'portrait' | 'landscape'; type RequireSource = ImageRequireSource; type ResizeModeContain = 'contain'; type ResizeModeCover = 'cover'; type ResizeModeStretch = 'stretch'; - type Orientation = 'portrait' | 'landscape'; - type Axis = number; + type URISource = ImageURISource; + interface HashMap { [key: string]: any; } - type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; - type BarCodeReadCallback = (params: { type: string; data: string; }) => void; - type Md5 = string; /** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ export namespace Accelerometer { From e813dac8a7841635be2f6cc56cd911253d857a3e Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Sat, 20 Jan 2018 13:35:36 +0100 Subject: [PATCH 10/52] Sort regions --- types/expo/index.d.ts | 840 +++++++++++++++++++++--------------------- 1 file changed, 420 insertions(+), 420 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index bfaffa4084..d45002a551 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -56,6 +56,251 @@ declare module 'expo' { function setUpdateInterval(intervalMs: number): void; } + /** + * Provides basic sample playback and recording. + * + * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. + */ + export namespace Audio { + enum InterruptionModeIos { + /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ + INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, + + /** If this option is set, your experience’s audio interrupts audio from other apps. */ + INTERRUPTION_MODE_IOS_DO_NOT_MIX = 1, + + /** If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ + INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 + } + + const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; + const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; + + enum InterruptionModeAndroid { + /** If this option is set, your experience’s audio interrupts audio from other apps. */ + INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, + + /** This is the default option. If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ + INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 + } + + const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; + + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; + + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; + + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; + + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; + + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; + + type RecordingStatus = { + canRecord: false, + isDoneRecording: false + } | { + canRecord: true, + isRecording: boolean, + durationMillis: number + } | { + canRecord: false, + isDoneRecording: true, + durationMillis: number + }; + + const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; + const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; + + interface RecordingOptions { + android: { + extension: string; + outputFormat: number; + audioEncoder: number; + sampleRate?: number; + numberOfChannels?: number; + bitRate?: number; + maxFileSize?: number; + }; + ios: { + extension: string; + outputFormat?: string | number; + audioQuality: number; + sampleRate: number; + numberOfChannels: number; + bitRate: number; + bitRateStrategy?: number; + bitDepthHint?: number; + linearPCMBitDepth?: number; + linearPCMIsBigEndian?: boolean; + linearPCMIsFloat?: boolean; + }; + } + + interface AudioMode { + /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ + playsInSilentModeIOS: boolean; + + /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ + allowsRecordingIOS: boolean; + + /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ + interruptionModeIOS: InterruptionModeIos; + + /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ + shouldDuckAndroid: boolean; + + /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ + interruptionModeAndroid: InterruptionModeAndroid; + } + + function setIsEnabledAsync(value: boolean): Promise; + function setAudioModeAsync(mode: AudioMode): Promise; + + /** This class represents a sound corresponding to an Asset or URL. */ + class Sound extends PlaybackObject { + constructor(); + + /** + * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. + * + * @returns A `Promise` that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: The newly created and loaded Sound object. + * - `status`: The PlaybackStatus of the Sound object. See the AV documentation for further information. + */ + static create( + /** + * The source of the sound. The following forms are supported: + * + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to an audio file on the web. + * - `require('path/to/file')` for an audio file asset in the source code directory. + * - An `Expo.Asset` object for an audio file asset. + */ + source: PlaybackSource, + + /** The initial intended PlaybackStatusToSet of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, + + /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ + downloadFirst?: boolean + ): Promise<{ sound: Sound, status: PlaybackStatus }>; + } + + class Recording { + constructor(); + + /** Gets the `status` of the `Recording`. */ + getStatusAsync(): Promise; + + /** Sets a function to be called regularly with the `status` of the `Recording`. */ + setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void; + + /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ + setProgressUpdateInterval(progressUpdateIntervalMillis: number): void; + + /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ + prepareToRecordAsync( + /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ + options?: RecordingOptions + ): Promise; + + /** Begins recording. This method can only be called if the `Recording` has been prepared. */ + startAsync(): Promise; + + /** + * Pauses recording. This method can only be called if the Recording has been prepared. + * + * NOTE: This is only available on Android API version 24 and later. + */ + pauseAsync(): Promise; + + /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ + stopAndUnloadAsync(): Promise; + + /** + * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. + * + * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. + */ + getURI(): string | null | undefined; + + /** + * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). + * + * @returns A Promise that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: the newly created and loaded Sound object. + * - `status`: the PlaybackStatus of the Sound object. + */ + createNewLoadedSound( + /** The initial intended `PlaybackStatusToSet` of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null + ): Promise<{ sound: Sound, status: PlaybackStatus }>; + } + } + /** * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. * @@ -348,327 +593,6 @@ declare module 'expo' { } // #endregion - /** - * Provides basic sample playback and recording. - * - * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. - */ - export namespace Audio { - enum InterruptionModeIos { - /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ - INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, - - /** If this option is set, your experience’s audio interrupts audio from other apps. */ - INTERRUPTION_MODE_IOS_DO_NOT_MIX = 1, - - /** If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ - INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 - } - - const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; - const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; - const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; - - enum InterruptionModeAndroid { - /** If this option is set, your experience’s audio interrupts audio from other apps. */ - INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, - - /** This is the default option. If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ - INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 - } - - const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; - const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; - - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; - - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; - - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; - - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; - - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; - - type RecordingStatus = { - canRecord: false, - isDoneRecording: false - } | { - canRecord: true, - isRecording: boolean, - durationMillis: number - } | { - canRecord: false, - isDoneRecording: true, - durationMillis: number - }; - - const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; - const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; - - interface RecordingOptions { - android: { - extension: string; - outputFormat: number; - audioEncoder: number; - sampleRate?: number; - numberOfChannels?: number; - bitRate?: number; - maxFileSize?: number; - }; - ios: { - extension: string; - outputFormat?: string | number; - audioQuality: number; - sampleRate: number; - numberOfChannels: number; - bitRate: number; - bitRateStrategy?: number; - bitDepthHint?: number; - linearPCMBitDepth?: number; - linearPCMIsBigEndian?: boolean; - linearPCMIsFloat?: boolean; - }; - } - - interface AudioMode { - /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ - playsInSilentModeIOS: boolean; - - /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ - allowsRecordingIOS: boolean; - - /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ - interruptionModeIOS: InterruptionModeIos; - - /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ - shouldDuckAndroid: boolean; - - /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ - interruptionModeAndroid: InterruptionModeAndroid; - } - - function setIsEnabledAsync(value: boolean): Promise; - function setAudioModeAsync(mode: AudioMode): Promise; - - /** This class represents a sound corresponding to an Asset or URL. */ - class Sound extends PlaybackObject { - constructor(); - - /** - * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. - * - * @returns A `Promise` that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: - * - `sound`: The newly created and loaded Sound object. - * - `status`: The PlaybackStatus of the Sound object. See the AV documentation for further information. - */ - static create( - /** - * The source of the sound. The following forms are supported: - * - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to an audio file on the web. - * - `require('path/to/file')` for an audio file asset in the source code directory. - * - An `Expo.Asset` object for an audio file asset. - */ - source: PlaybackSource, - - /** The initial intended PlaybackStatusToSet of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ - initialStatus?: PlaybackStatusToSet, - - /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ - onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, - - /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ - downloadFirst?: boolean - ): Promise<{ sound: Sound, status: PlaybackStatus }>; - } - - class Recording { - constructor(); - - /** Gets the `status` of the `Recording`. */ - getStatusAsync(): Promise; - - /** Sets a function to be called regularly with the `status` of the `Recording`. */ - setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void; - - /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ - setProgressUpdateInterval(progressUpdateIntervalMillis: number): void; - - /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ - prepareToRecordAsync( - /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ - options?: RecordingOptions - ): Promise; - - /** Begins recording. This method can only be called if the `Recording` has been prepared. */ - startAsync(): Promise; - - /** - * Pauses recording. This method can only be called if the Recording has been prepared. - * - * NOTE: This is only available on Android API version 24 and later. - */ - pauseAsync(): Promise; - - /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ - stopAndUnloadAsync(): Promise; - - /** - * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. - * - * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. - */ - getURI(): string | null | undefined; - - /** - * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). - * - * @returns A Promise that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: - * - `sound`: the newly created and loaded Sound object. - * - `status`: the PlaybackStatus of the Sound object. - */ - createNewLoadedSound( - /** The initial intended `PlaybackStatusToSet` of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ - initialStatus?: PlaybackStatusToSet, - - /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ - onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null - ): Promise<{ sound: Sound, status: PlaybackStatus }>; - } - } - - // #region Video - /** - * Expo Video - */ - export interface NaturalSize { - width: number; - height: number; - orientation: Orientation; - } - - export interface ReadyForDisplayEvent { - naturalSize: NaturalSize; - status: PlaybackStatus; - } - - export enum FullscreenUpdateVariants { - IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, - IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, - IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, - IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 - } - - export interface FullscreenUpdateEvent { - fullscreenUpdate: FullscreenUpdateVariants; - status: PlaybackStatus; - } - - export interface VideoProps { - source?: PlaybackSource | null; - posterSource?: URISource | RequireSource; - - resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; - useNativeControls?: boolean; - usePoster?: boolean; - - onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; - onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; - onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; - - onLoadStart?: () => void; - onLoad?: (status: PlaybackStatus) => void; - onError?: (error: string) => void; - - status?: PlaybackStatusToSet; - progressUpdateIntervalMillis?: number; - positionMillis?: number; - shouldPlay?: boolean; - rate?: number; - shouldCorrectPitch?: boolean; - volume?: number; - isMuted?: boolean; - isLooping?: boolean; - - scaleX?: number; - scaleY?: number; - translateX?: number; - translateY?: number; - rotation?: number; - ref?: Ref; - } - - export interface VideoState { - showPoster: boolean; - } - - export class Video extends Component { - static RESIZE_MODE_CONTAIN: ResizeModeContain; - static RESIZE_MODE_COVER: ResizeModeCover; - static RESIZE_MODE_STRETCH: ResizeModeStretch; - static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; - static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; - static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; - static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; - } - // #endregion - // #region AppLoading /** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ export type AppLoadingProps = { @@ -1153,6 +1077,75 @@ declare module 'expo' { } } + /** + * FaceDetector + */ + export namespace FaceDetector { + interface Point { + x: Axis; + y: Axis; + } + interface FaceFeature { + bounds: { + size: { + width: number; + height: number; + }, + origin: Point; + }; + smilingProbability?: number; + leftEarPosition?: Point; + rightEarPosition?: Point; + leftEyePosition?: Point; + leftEyeOpenProbability?: number; + rightEyePosition?: Point; + rightEyeOpenProbability?: number; + leftCheekPosition?: Point; + rightCheekPosition?: Point; + leftMouthPosition?: Point; + mouthPosition?: Point; + rightMouthPosition?: Point; + bottomMouthPosition?: Point; + noseBasePosition?: Point; + yawAngle?: number; + rollAngle?: number; + } + interface DetectFaceResult { + faces: FaceFeature[]; + image: { + uri: string; + width: number; + height: number; + orientation: number; + }; + } + interface Mode { + fast: 'fast'; + accurate: 'accurate'; + } + interface _Shared { + all: 'all'; + none: 'none'; + } + type Landmarks = _Shared; + type Classifications = _Shared; + interface _Constants { + Mode: Mode; + Landmarks: Landmarks; + Classifications: Classifications; + } + + const Constants: _Constants; + + interface DetectionOptions { + mode?: keyof Mode; + detectLandmarks?: keyof Landmarks; + runClassifications?: keyof Classifications; + } + + function detectFaces(uri: string, options?: DetectionOptions): Promise; + } + /** * FileSystem */ @@ -1335,6 +1328,36 @@ declare module 'expo' { function setUpdateInterval(intervalMs: number): void; } + /** + * ImageManipulator + */ + export namespace ImageManipulator { + interface ImageResult { + uri: string; + width: number; + height: number; + base64?: string; + } + interface SaveOptions { + base64?: boolean; + compress?: FloatFromZeroToOne; + format?: 'jpeg' | 'png'; + } + interface CropParameters { + originX: number; + originY: number; + width: number; + height: number; + } + interface ImageManipulationOptions { + resize?: { width?: number; height?: number }; + rotate?: number; + flip?: { vertical?: boolean; horizontal?: boolean }; + crop?: CropParameters; + } + function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; + } + /** * Image Picker */ @@ -1940,6 +1963,82 @@ declare module 'expo' { }) => void): { remove(): void; }; } + // #region Video + /** + * Expo Video + */ + export interface NaturalSize { + width: number; + height: number; + orientation: Orientation; + } + + export interface ReadyForDisplayEvent { + naturalSize: NaturalSize; + status: PlaybackStatus; + } + + export enum FullscreenUpdateVariants { + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 + } + + export interface FullscreenUpdateEvent { + fullscreenUpdate: FullscreenUpdateVariants; + status: PlaybackStatus; + } + + export interface VideoProps { + source?: PlaybackSource | null; + posterSource?: URISource | RequireSource; + + resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; + useNativeControls?: boolean; + usePoster?: boolean; + + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; + onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; + onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; + + onLoadStart?: () => void; + onLoad?: (status: PlaybackStatus) => void; + onError?: (error: string) => void; + + status?: PlaybackStatusToSet; + progressUpdateIntervalMillis?: number; + positionMillis?: number; + shouldPlay?: boolean; + rate?: number; + shouldCorrectPitch?: boolean; + volume?: number; + isMuted?: boolean; + isLooping?: boolean; + + scaleX?: number; + scaleY?: number; + translateX?: number; + translateY?: number; + rotation?: number; + ref?: Ref; + } + + export interface VideoState { + showPoster: boolean; + } + + export class Video extends Component { + static RESIZE_MODE_CONTAIN: ResizeModeContain; + static RESIZE_MODE_COVER: ResizeModeCover; + static RESIZE_MODE_STRETCH: ResizeModeStretch; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; + } + // #endregion + /** * Web Browser */ @@ -1948,103 +2047,4 @@ declare module 'expo' { function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; function dismissBrowser(): Promise<{ type: 'dismissed' }>; } - - /** - * ImageManipulator - */ - export namespace ImageManipulator { - interface ImageResult { - uri: string; - width: number; - height: number; - base64?: string; - } - interface SaveOptions { - base64?: boolean; - compress?: FloatFromZeroToOne; - format?: 'jpeg' | 'png'; - } - interface CropParameters { - originX: number; - originY: number; - width: number; - height: number; - } - interface ImageManipulationOptions { - resize?: { width?: number; height?: number }; - rotate?: number; - flip?: { vertical?: boolean; horizontal?: boolean }; - crop?: CropParameters; - } - function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; - } - - /** - * FaceDetector - */ - export namespace FaceDetector { - interface Point { - x: Axis; - y: Axis; - } - interface FaceFeature { - bounds: { - size: { - width: number; - height: number; - }, - origin: Point; - }; - smilingProbability?: number; - leftEarPosition?: Point; - rightEarPosition?: Point; - leftEyePosition?: Point; - leftEyeOpenProbability?: number; - rightEyePosition?: Point; - rightEyeOpenProbability?: number; - leftCheekPosition?: Point; - rightCheekPosition?: Point; - leftMouthPosition?: Point; - mouthPosition?: Point; - rightMouthPosition?: Point; - bottomMouthPosition?: Point; - noseBasePosition?: Point; - yawAngle?: number; - rollAngle?: number; - } - interface DetectFaceResult { - faces: FaceFeature[]; - image: { - uri: string; - width: number; - height: number; - orientation: number; - }; - } - interface Mode { - fast: 'fast'; - accurate: 'accurate'; - } - interface _Shared { - all: 'all'; - none: 'none'; - } - type Landmarks = _Shared; - type Classifications = _Shared; - interface _Constants { - Mode: Mode; - Landmarks: Landmarks; - Classifications: Classifications; - } - - const Constants: _Constants; - - interface DetectionOptions { - mode?: keyof Mode; - detectLandmarks?: keyof Landmarks; - runClassifications?: keyof Classifications; - } - - function detectFaces(uri: string, options?: DetectionOptions): Promise; - } } From e773f10f4107c4f258f4ea80c195f3cb25baaed9 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:14:19 +0100 Subject: [PATCH 11/52] Remove 'expo' namespace --- types/expo/index.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 632f542a6f..84150b0c2a 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -17,7 +17,6 @@ import { ViewStyle } from 'react-native'; -declare module 'expo' { type Axis = number; type BarCodeReadCallback = (params: { type: string; data: string; }) => void; type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; @@ -2047,4 +2046,3 @@ declare module 'expo' { function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; function dismissBrowser(): Promise<{ type: 'dismissed' }>; } -} From 485a9e65e89bdff4c6b6b5673436c7a0ce912d1a Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:14:30 +0100 Subject: [PATCH 12/52] Auto format --- types/expo/index.d.ts | 3846 ++++++++++++++++++++--------------------- 1 file changed, 1923 insertions(+), 1923 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 84150b0c2a..4ae37691a4 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -17,2032 +17,2032 @@ import { ViewStyle } from 'react-native'; - type Axis = number; - type BarCodeReadCallback = (params: { type: string; data: string; }) => void; - type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; - type Md5 = string; - type Orientation = 'portrait' | 'landscape'; - type RequireSource = ImageRequireSource; - type ResizeModeContain = 'contain'; - type ResizeModeCover = 'cover'; - type ResizeModeStretch = 'stretch'; - type URISource = ImageURISource; +type Axis = number; +type BarCodeReadCallback = (params: { type: string; data: string; }) => void; +type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; +type Md5 = string; +type Orientation = 'portrait' | 'landscape'; +type RequireSource = ImageRequireSource; +type ResizeModeContain = 'contain'; +type ResizeModeCover = 'cover'; +type ResizeModeStretch = 'stretch'; +type URISource = ImageURISource; - interface HashMap { [key: string]: any; } +interface HashMap { [key: string]: any; } - /** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ - export namespace Accelerometer { - interface AccelerometerObject { - x: Axis; - y: Axis; - z: Axis; - } - - /** - * Subscribe for updates to the accelerometer. - * @param listener A callback that is invoked when an accelerometer update is available. When invoked, the listener is provided a single argumument that is an object containing keys x, y, z. - * @returns An EventSubscription object that you can call remove() on when you would like to unsubscribe the listener. - */ - function addListener(listener: (obj: AccelerometerObject) => any): EventSubscription; - - /** Remove all listeners. */ - function removeAllListeners(): void; - - /** - * Subscribe for updates to the accelerometer. - * @param intervalMs Desired interval in milliseconds between accelerometer updates. - */ - function setUpdateInterval(intervalMs: number): void; +/** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ +export namespace Accelerometer { + interface AccelerometerObject { + x: Axis; + y: Axis; + z: Axis; } /** - * Provides basic sample playback and recording. - * - * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. + * Subscribe for updates to the accelerometer. + * @param listener A callback that is invoked when an accelerometer update is available. When invoked, the listener is provided a single argumument that is an object containing keys x, y, z. + * @returns An EventSubscription object that you can call remove() on when you would like to unsubscribe the listener. */ - export namespace Audio { - enum InterruptionModeIos { - /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ - INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, + function addListener(listener: (obj: AccelerometerObject) => any): EventSubscription; - /** If this option is set, your experience’s audio interrupts audio from other apps. */ - INTERRUPTION_MODE_IOS_DO_NOT_MIX = 1, - - /** If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ - INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 - } - - const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; - const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; - const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; - - enum InterruptionModeAndroid { - /** If this option is set, your experience’s audio interrupts audio from other apps. */ - INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, - - /** This is the default option. If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ - INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 - } - - const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; - const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; - - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; - - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; - - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; - - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; - - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; - - type RecordingStatus = { - canRecord: false, - isDoneRecording: false - } | { - canRecord: true, - isRecording: boolean, - durationMillis: number - } | { - canRecord: false, - isDoneRecording: true, - durationMillis: number - }; - - const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; - const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; - - interface RecordingOptions { - android: { - extension: string; - outputFormat: number; - audioEncoder: number; - sampleRate?: number; - numberOfChannels?: number; - bitRate?: number; - maxFileSize?: number; - }; - ios: { - extension: string; - outputFormat?: string | number; - audioQuality: number; - sampleRate: number; - numberOfChannels: number; - bitRate: number; - bitRateStrategy?: number; - bitDepthHint?: number; - linearPCMBitDepth?: number; - linearPCMIsBigEndian?: boolean; - linearPCMIsFloat?: boolean; - }; - } - - interface AudioMode { - /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ - playsInSilentModeIOS: boolean; - - /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ - allowsRecordingIOS: boolean; - - /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ - interruptionModeIOS: InterruptionModeIos; - - /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ - shouldDuckAndroid: boolean; - - /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ - interruptionModeAndroid: InterruptionModeAndroid; - } - - function setIsEnabledAsync(value: boolean): Promise; - function setAudioModeAsync(mode: AudioMode): Promise; - - /** This class represents a sound corresponding to an Asset or URL. */ - class Sound extends PlaybackObject { - constructor(); - - /** - * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. - * - * @returns A `Promise` that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: - * - `sound`: The newly created and loaded Sound object. - * - `status`: The PlaybackStatus of the Sound object. See the AV documentation for further information. - */ - static create( - /** - * The source of the sound. The following forms are supported: - * - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to an audio file on the web. - * - `require('path/to/file')` for an audio file asset in the source code directory. - * - An `Expo.Asset` object for an audio file asset. - */ - source: PlaybackSource, - - /** The initial intended PlaybackStatusToSet of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ - initialStatus?: PlaybackStatusToSet, - - /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ - onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, - - /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ - downloadFirst?: boolean - ): Promise<{ sound: Sound, status: PlaybackStatus }>; - } - - class Recording { - constructor(); - - /** Gets the `status` of the `Recording`. */ - getStatusAsync(): Promise; - - /** Sets a function to be called regularly with the `status` of the `Recording`. */ - setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void; - - /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ - setProgressUpdateInterval(progressUpdateIntervalMillis: number): void; - - /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ - prepareToRecordAsync( - /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ - options?: RecordingOptions - ): Promise; - - /** Begins recording. This method can only be called if the `Recording` has been prepared. */ - startAsync(): Promise; - - /** - * Pauses recording. This method can only be called if the Recording has been prepared. - * - * NOTE: This is only available on Android API version 24 and later. - */ - pauseAsync(): Promise; - - /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ - stopAndUnloadAsync(): Promise; - - /** - * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. - * - * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. - */ - getURI(): string | null | undefined; - - /** - * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). - * - * @returns A Promise that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: - * - `sound`: the newly created and loaded Sound object. - * - `status`: the PlaybackStatus of the Sound object. - */ - createNewLoadedSound( - /** The initial intended `PlaybackStatusToSet` of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ - initialStatus?: PlaybackStatusToSet, - - /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ - onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null - ): Promise<{ sound: Sound, status: PlaybackStatus }>; - } - } + /** Remove all listeners. */ + function removeAllListeners(): void; /** - * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. - * - * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. + * Subscribe for updates to the accelerometer. + * @param intervalMs Desired interval in milliseconds between accelerometer updates. */ - export namespace Amplitude { - /** Initializes Amplitude with your Amplitude API key. */ - function initialize(apiKey: string): void; + function setUpdateInterval(intervalMs: number): void; +} - /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ - function setUserId(userId: string): void; +/** + * Provides basic sample playback and recording. + * + * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. + */ +export namespace Audio { + enum InterruptionModeIos { + /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ + INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, - /** Set properties for the current user. */ - function setUserProperties(userProperties: HashMap): void; + /** If this option is set, your experience’s audio interrupts audio from other apps. */ + INTERRUPTION_MODE_IOS_DO_NOT_MIX = 1, - /** Clear properties set by `setUserProperties()`. */ - function clearUserProperties(): void; - - /** Log an event to Amplitude. */ - function logEvent(eventName: string): void; - - /** Log an event to Amplitude with custom properties. */ - function logEventWithProperties( - eventName: string, - - /** A map of custom properties. */ - properties: HashMap - ): void; - - /** Add the current user to a group. */ - function setGroup( - /** The group name, e.g. `'sports'`. */ - groupType: string, - - /** An array of group names, e.g. `['tennis', 'soccer']`. */ - groupNames: string[] - ): void; + /** If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ + INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 } - /** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ - export class Asset { - constructor({ name, type, hash, uri, width, height }: { - name: string; - type: string; - hash: string; - uri: string; - width?: number; - height?: number; - }); + const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; + const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; - /** The MD5 hash of the asset’s data. */ - hash: Md5; + enum InterruptionModeAndroid { + /** If this option is set, your experience’s audio interrupts audio from other apps. */ + INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, - /** The name of the asset file without the extension. Also without the part from @ onward in the filename (used to specify scale factor for images). */ - name: string; - - /** The extension of the asset filename. */ - type: string; - - /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ - uri: string; - - /** If the asset has been downloaded (by calling `downloadAsync()`), the `file://` URI pointing to the local file on the device that contains the asset data. */ - localUri: string; - - /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ - width?: number; - - /** If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ - height?: number; - - downloading: boolean; - downloaded: boolean; - downloadCallbacks: Array<{ resolve: () => any, reject: (e?: any) => any }>; - - /** Downloads the asset data to a local file in the device’s cache directory. Once the returned promise is fulfilled without error, the localUri field of this asset points to a local file containing the asset data. The asset is only downloaded if an up-to-date local file for the asset isn’t already present due to an earlier download. */ - downloadAsync(): Promise; - - /** Returns the `Expo.Asset` instance representing an asset given its module. */ - static fromModule(module: RequireSource): Asset; - - /** - * A helper that wraps `Expo.Asset.fromModule(module).downloadAsync` for convenience. - * @param moduleIds An array of `require('path/to/file')`. Can also be just one module without an Array. - */ - static loadAsync(module: RequireSource[] | RequireSource): Promise; + /** This is the default option. If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ + INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 } - /** - * AuthSession - */ - export namespace AuthSession { - function startAsync(options: { authUrl: string; returnUrl?: string; }): Promise<{ - type: 'cancel'; - } | { - type: 'dismissed'; - } | { - type: 'success'; - params: HashMap; - event: HashMap; - } | { - type: 'error'; - params: HashMap; - errorCode: string; - event: HashMap; - }>; - function dismiss(): void; - function getRedirectUrl(): string; - } + const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; - // #region AV - /** - * AV - */ - export type PlaybackStatus = { - isLoaded: false; - androidImplementation?: string; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; - /** Populated exactly once when an error forces the object to unload. */ - error?: string; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; + + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; + + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; + + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; + + type RecordingStatus = { + canRecord: false, + isDoneRecording: false } | { - isLoaded: true; - androidImplementation?: string; - uri: string; - progressUpdateIntervalMillis: number; - durationMillis?: number; - positionMillis: number; - playableDurationMillis?: number; - shouldPlay: boolean; - isPlaying: boolean; - isBuffering: boolean; - rate: number; - shouldCorrectPitch: boolean; - volume: number; - isMuted: boolean; - isLooping: boolean; - - /** True exactly once when the track plays to finish. */ - didJustFinish: boolean; + canRecord: true, + isRecording: boolean, + durationMillis: number + } | { + canRecord: false, + isDoneRecording: true, + durationMillis: number }; - export interface PlaybackStatusToSet { - androidImplementation?: string; - progressUpdateIntervalMillis?: number; - positionMillis?: number; - shouldPlay?: boolean; - rate?: FloatFromZeroToOne; - shouldCorrectPitch?: boolean; - volume?: FloatFromZeroToOne; - isMuted?: boolean; - isLooping?: boolean; + const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; + const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; + + interface RecordingOptions { + android: { + extension: string; + outputFormat: number; + audioEncoder: number; + sampleRate?: number; + numberOfChannels?: number; + bitRate?: number; + maxFileSize?: number; + }; + ios: { + extension: string; + outputFormat?: string | number; + audioQuality: number; + sampleRate: number; + numberOfChannels: number; + bitRate: number; + bitRateStrategy?: number; + bitDepthHint?: number; + linearPCMBitDepth?: number; + linearPCMIsBigEndian?: boolean; + linearPCMIsFloat?: boolean; + }; } - export type PlaybackSource = RequireSource | { uri: string } | Asset; + interface AudioMode { + /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ + playsInSilentModeIOS: boolean; - export class PlaybackObject { - /** - * Gets the `PlaybackStatus` of the `playbackObject`. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. - */ - getStatusAsync(): Promise; + /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ + allowsRecordingIOS: boolean; + + /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ + interruptionModeIOS: InterruptionModeIos; + + /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ + shouldDuckAndroid: boolean; + + /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ + interruptionModeAndroid: InterruptionModeAndroid; + } + + function setIsEnabledAsync(value: boolean): Promise; + function setAudioModeAsync(mode: AudioMode): Promise; + + /** This class represents a sound corresponding to an Asset or URL. */ + class Sound extends PlaybackObject { + constructor(); /** - * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. + * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. + * @returns A `Promise` that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: The newly created and loaded Sound object. + * - `status`: The PlaybackStatus of the Sound object. See the AV documentation for further information. */ - loadAsync( + static create( /** - * The source of the media. The following forms are supported: - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. - * - `require('path/to/file')` for a media file asset in the source code directory. - * - An `Expo.Asset object` for a media file asset. + * The source of the sound. The following forms are supported: + * + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to an audio file on the web. + * - `require('path/to/file')` for an audio file asset in the source code directory. + * - An `Expo.Asset` object for an audio file asset. */ source: PlaybackSource, - /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ + /** The initial intended PlaybackStatusToSet of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ initialStatus?: PlaybackStatusToSet, - /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ + /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, + + /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ downloadFirst?: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ - pauseAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. - */ - playAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. - */ - playFromPositionAsync( - /** The desired position of playback in milliseconds. */ - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** - * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. - */ - replayAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ - setIsLoopingAsync( - /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ - isLooping: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ - setIsMutedAsync( - /** A boolean describing if the audio of this media should be muted. */ - isMuted: boolean - ): Promise; - - /** - * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. - * - * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. - */ - setOnPlaybackStatusUpdate( - /** A function taking a single parameter `PlaybackStatus`. */ - onPlaybackStatusUpdate?: (status: PlaybackStatus) => void - ): void; - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ - setPositionAsync( - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ - setProgressUpdateIntervalAsync( - /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ - progressUpdateIntervalMillis: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ - setRateAsync( - /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ - rate: number, - - /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ - shouldCorrectPitch: boolean - ): Promise; - - /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ - setStatusAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ - setVolumeAsync( - /** A number between `0.0` (silence) and `1.0` (maximum volume). */ - volume: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ - stopAsync(): Promise; - - /** - * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. - */ - unloadAsync(): Promise; + ): Promise<{ sound: Sound, status: PlaybackStatus }>; } - // #endregion - // #region AppLoading - /** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ - export type AppLoadingProps = { - /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ - startAsync: () => Promise; + class Recording { + constructor(); - /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ - onFinish: () => void; + /** Gets the `status` of the `Recording`. */ + getStatusAsync(): Promise; - /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ - onError?: (error: Error) => void; + /** Sets a function to be called regularly with the `status` of the `Recording`. */ + setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void; + + /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ + setProgressUpdateInterval(progressUpdateIntervalMillis: number): void; + + /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ + prepareToRecordAsync( + /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ + options?: RecordingOptions + ): Promise; + + /** Begins recording. This method can only be called if the `Recording` has been prepared. */ + startAsync(): Promise; + + /** + * Pauses recording. This method can only be called if the Recording has been prepared. + * + * NOTE: This is only available on Android API version 24 and later. + */ + pauseAsync(): Promise; + + /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ + stopAndUnloadAsync(): Promise; + + /** + * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. + * + * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. + */ + getURI(): string | null | undefined; + + /** + * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). + * + * @returns A Promise that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: the newly created and loaded Sound object. + * - `status`: the PlaybackStatus of the Sound object. + */ + createNewLoadedSound( + /** The initial intended `PlaybackStatusToSet` of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null + ): Promise<{ sound: Sound, status: PlaybackStatus }>; + } +} + +/** + * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. + * + * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. + */ +export namespace Amplitude { + /** Initializes Amplitude with your Amplitude API key. */ + function initialize(apiKey: string): void; + + /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ + function setUserId(userId: string): void; + + /** Set properties for the current user. */ + function setUserProperties(userProperties: HashMap): void; + + /** Clear properties set by `setUserProperties()`. */ + function clearUserProperties(): void; + + /** Log an event to Amplitude. */ + function logEvent(eventName: string): void; + + /** Log an event to Amplitude with custom properties. */ + function logEventWithProperties( + eventName: string, + + /** A map of custom properties. */ + properties: HashMap + ): void; + + /** Add the current user to a group. */ + function setGroup( + /** The group name, e.g. `'sports'`. */ + groupType: string, + + /** An array of group names, e.g. `['tennis', 'soccer']`. */ + groupNames: string[] + ): void; +} + +/** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ +export class Asset { + constructor({ name, type, hash, uri, width, height }: { + name: string; + type: string; + hash: string; + uri: string; + width?: number; + height?: number; + }); + + /** The MD5 hash of the asset’s data. */ + hash: Md5; + + /** The name of the asset file without the extension. Also without the part from @ onward in the filename (used to specify scale factor for images). */ + name: string; + + /** The extension of the asset filename. */ + type: string; + + /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ + uri: string; + + /** If the asset has been downloaded (by calling `downloadAsync()`), the `file://` URI pointing to the local file on the device that contains the asset data. */ + localUri: string; + + /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ + width?: number; + + /** If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ + height?: number; + + downloading: boolean; + downloaded: boolean; + downloadCallbacks: Array<{ resolve: () => any, reject: (e?: any) => any }>; + + /** Downloads the asset data to a local file in the device’s cache directory. Once the returned promise is fulfilled without error, the localUri field of this asset points to a local file containing the asset data. The asset is only downloaded if an up-to-date local file for the asset isn’t already present due to an earlier download. */ + downloadAsync(): Promise; + + /** Returns the `Expo.Asset` instance representing an asset given its module. */ + static fromModule(module: RequireSource): Asset; + + /** + * A helper that wraps `Expo.Asset.fromModule(module).downloadAsync` for convenience. + * @param moduleIds An array of `require('path/to/file')`. Can also be just one module without an Array. + */ + static loadAsync(module: RequireSource[] | RequireSource): Promise; +} + +/** + * AuthSession + */ +export namespace AuthSession { + function startAsync(options: { authUrl: string; returnUrl?: string; }): Promise<{ + type: 'cancel'; } | { - startAsync: null; - onFinish: null; - onError?: null; + type: 'dismissed'; + } | { + type: 'success'; + params: HashMap; + event: HashMap; + } | { + type: 'error'; + params: HashMap; + errorCode: string; + event: HashMap; + }>; + function dismiss(): void; + function getRedirectUrl(): string; +} + +// #region AV +/** + * AV + */ +export type PlaybackStatus = { + isLoaded: false; + androidImplementation?: string; + + /** Populated exactly once when an error forces the object to unload. */ + error?: string; +} | { + isLoaded: true; + androidImplementation?: string; + uri: string; + progressUpdateIntervalMillis: number; + durationMillis?: number; + positionMillis: number; + playableDurationMillis?: number; + shouldPlay: boolean; + isPlaying: boolean; + isBuffering: boolean; + rate: number; + shouldCorrectPitch: boolean; + volume: number; + isMuted: boolean; + isLooping: boolean; + + /** True exactly once when the track plays to finish. */ + didJustFinish: boolean; + }; + +export interface PlaybackStatusToSet { + androidImplementation?: string; + progressUpdateIntervalMillis?: number; + positionMillis?: number; + shouldPlay?: boolean; + rate?: FloatFromZeroToOne; + shouldCorrectPitch?: boolean; + volume?: FloatFromZeroToOne; + isMuted?: boolean; + isLooping?: boolean; +} + +export type PlaybackSource = RequireSource | { uri: string } | Asset; + +export class PlaybackObject { + /** + * Gets the `PlaybackStatus` of the `playbackObject`. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. + */ + getStatusAsync(): Promise; + + /** + * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. + */ + loadAsync( + /** + * The source of the media. The following forms are supported: + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. + * - `require('path/to/file')` for a media file asset in the source code directory. + * - An `Expo.Asset object` for a media file asset. + */ + source: PlaybackSource, + + /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ + initialStatus?: PlaybackStatusToSet, + + /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ + downloadFirst?: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ + pauseAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. + */ + playAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. + */ + playFromPositionAsync( + /** The desired position of playback in milliseconds. */ + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** + * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. + */ + replayAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ + setIsLoopingAsync( + /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ + isLooping: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ + setIsMutedAsync( + /** A boolean describing if the audio of this media should be muted. */ + isMuted: boolean + ): Promise; + + /** + * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. + * + * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. + */ + setOnPlaybackStatusUpdate( + /** A function taking a single parameter `PlaybackStatus`. */ + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void + ): void; + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ + setPositionAsync( + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ + setProgressUpdateIntervalAsync( + /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ + progressUpdateIntervalMillis: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ + setRateAsync( + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate: number, + + /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ + shouldCorrectPitch: boolean + ): Promise; + + /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ + setStatusAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ + setVolumeAsync( + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ + stopAsync(): Promise; + + /** + * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. + */ + unloadAsync(): Promise; +} +// #endregion + +// #region AppLoading +/** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ +export type AppLoadingProps = { + /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ + startAsync: () => Promise; + + /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ + onFinish: () => void; + + /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ + onError?: (error: Error) => void; +} | { + startAsync: null; + onFinish: null; + onError?: null; + }; + +/** + * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. + * + * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. + */ +export class AppLoading extends Component { } +// #endregion AppLoading + +// #region BarCodeScanner +/** + * BarCodeScanner + */ +export interface BarCodeScannerProps extends ViewProperties { + type?: 'front' | 'back'; + torchMode?: 'on' | 'off'; + barCodeTypes?: string[]; + onBarCodeRead?: BarCodeReadCallback; +} + +export class BarCodeScanner extends Component { } +// #endregion + +// #region BlurView +/** + * BlurView + */ +export interface BlurViewProps extends ViewProperties { + tint: 'light' | 'default' | 'dark'; + intensity: number; +} +export class BlurView extends Component { } +// #endregion + +/** + * Brightness + */ +export namespace Brightness { + function setBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; + function getBrightnessAsync(): Promise; + function getSystemBrightnessAsync(): Promise; + function setSystemBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; +} + +// #region Camera +/** + * Camera + */ +interface PictureOptions { + quality?: number; +} +export interface PictureResponse { + uri: string; + width: number; + height: number; + exif: string; + base64: string; +} +export interface RecordingOptions { + quality?: string | number; + maxDuration?: number; + maxFileSize?: number; +} +export class CameraObject { + takePictureAsync(options: PictureOptions): Promise; + recordAsync(options: RecordingOptions): Promise<{ uri: string; }>; + stopRecording(): void; + getSupportedRatiosAsync(): Promise; // Android only +} +export interface CameraProps extends ViewProperties { + flashMode?: string | number; + type?: string | number; + ratio?: string; + autoFocus?: string | number | boolean; + focusDepth?: FloatFromZeroToOne; + zoom?: FloatFromZeroToOne; + whiteBalance?: string | number; + barCodeTypes?: string[]; + onCameraReady?: () => void; + onMountError?: () => void; + onBarCodeRead?: BarCodeReadCallback; + ref?: Ref; +} +interface CameraConstants { + readonly Type: string; + readonly FlashMode: string; + readonly AutoFocus: string; + readonly WhiteBalance: string; + readonly VideoQuality: string; + readonly BarCodeType: string; +} +export class Camera extends Component { + static readonly Constants: CameraConstants; +} +// #endregion + +/** + * Constants + */ +export namespace Constants { + const appOwnership: 'expo' | 'standalone' | 'guest'; + const expoVersion: string; + const deviceId: string; + const deviceName: string; + const deviceYearClass: number; + const isDevice: boolean; + + interface Platform { + ios: { + platform: string; + model: string; + userInterfaceIdiom: string; + }; + } + const platform: Platform; + const sessionId: string; + const statusBarHeight: number; + const systemFonts: string[]; + + interface Manifest { + name: string; + description?: string; + slug?: string; + sdkVersion?: string; + version?: string; + orientation?: Orientation; + primaryColor?: string; + privacy?: 'public' | 'unlisted'; + scheme?: string; + icon?: string; + platforms?: string[]; + githubUrl?: string; + notification?: { + icon?: string, + color?: string, + androidMode?: 'default' | 'collapse', + androidCollapsedTitle?: string + }; + loading?: { + icon?: string, + exponentIconColor?: 'white' | 'blue', + exponentIconGrayscale?: 1 | 0, + backgroundImage?: string, + backgroundColor?: string, + hideExponentText?: boolean + }; + appKey?: string; + androidStatusBar?: { + barStyle?: 'lignt-content' | 'dark-content', + backgroundColor?: string + }; + androidShowExponentNotificationInShellApp?: boolean; + extra?: { + [propName: string]: any + }; + rnCliPath?: any; + entryPoint?: string; + packagerOpts?: { + hostType?: string, + dev?: boolean, + strict?: boolean, + minify?: boolean, + urlType?: string, + urlRandomness?: string, + lanType?: string, + [propName: string]: any + }; + ignoreNodeModulesValidation?: any; + nodeModulesPath?: string; + ios?: { + bundleIdentifier?: string, + buildNumber?: string, + config?: { + usesNonExemptEncryption?: boolean, + googleSignIn?: { + reservedClientId: string + } + }, + supportsTablet?: boolean, + infoPlist?: any + }; + android?: { + package?: string, + versionCode?: string, + config?: { + fabric?: { + apiKey: string, + buildSecret: string + }, + googleMaps?: { + apiKey: string + }, + googleSignIn?: { + apiKey: string, + certificateHash: string + } + } + }; + facebookScheme?: any; + facebookAppId?: string; + facebookDisplayName?: string; + splash?: { + backgroundColor?: string; + resizeMode?: ResizeModeContain | ResizeModeCover; + image?: string; + }; + assetBundlePatterns?: string[]; + releaseChannel: string; + [propName: string]: any; + } + const manifest: Manifest; + const linkingUri: string; +} + +/** + * Contacts + */ +export namespace Contacts { + type PhoneNumbers = 'phoneNumbers'; + type Emails = 'emails'; + type Addresses = 'addresses'; + type Image = 'image'; + type Thumbnail = 'thumbnail'; + type Note = 'note'; + type Birthday = 'birthday'; + type NonGregorianBirthday = 'nonGregorianBirthday'; + type NamePrefix = 'namePrefix'; + type NameSuffix = 'nameSuffix'; + type PhoneticFirstName = 'phoneticFirstName'; + type PhoneticMiddleName = 'phoneticMiddleName'; + type PhoneticLastName = 'phoneticLastName'; + type SocialProfiles = 'socialProfiles'; + type InstantMessageAddresses = 'instantMessageAddresses'; + type UrlAddresses = 'urlAddresses'; + type Dates = 'dates'; + type Relationships = 'relationships'; + + const PHONE_NUMBERS: PhoneNumbers; + const EMAILS: Emails; + const ADDRESSES: Addresses; + const IMAGE: Image; + const THUMBNAIL: Thumbnail; + const NOTE: Note; + const BIRTHDAY: Birthday; + const NON_GREGORIAN_BIRTHDAY: NonGregorianBirthday; + const NAME_PREFIX: NamePrefix; + const NAME_SUFFIX: NameSuffix; + const PHONETIC_FIRST_NAME: PhoneticFirstName; + const PHONETIC_MIDDLE_NAME: PhoneticMiddleName; + const PHONETIC_LAST_NAME: PhoneticLastName; + const SOCIAL_PROFILES: SocialProfiles; + const IM_ADDRESSES: InstantMessageAddresses; + const URLS: UrlAddresses; + const DATES: Dates; + const RELATIONSHIPS: Relationships; + + type FieldType = PhoneNumbers | Emails | Addresses | Image | Thumbnail | + Note | Birthday | NonGregorianBirthday | NamePrefix | NameSuffix | + PhoneticFirstName | PhoneticMiddleName | PhoneticLastName | SocialProfiles | + InstantMessageAddresses | UrlAddresses | Dates | Relationships; + + interface Options { + pageSize?: number; + pageOffset?: number; + fields?: FieldType[]; + } + + interface Contact { + id: string; + contactType: string; + name: string; + firstName?: string; + middleName?: string; + lastName?: string; + previousLastName?: string; + namePrefix?: string; + nameSuffix?: string; + nickname?: string; + phoneticFirstName?: string; + phoneticMiddleName?: string; + phoneticLastName?: string; + emails?: Array<{ + email?: string; + primary?: boolean; + label: string; + id: string; + }>; + phoneNumbers?: Array<{ + number?: string; + primary?: boolean; + digits?: string; + countryCode?: string; + label: string; + id: string; + }>; + addresses?: Array<{ + street?: string; + city?: string; + country?: string; + region?: string; + neighborhood?: string; + postalCode?: string; + poBox?: string; + isoCountryCode?: string; + label: string; + id: string; + }>; + socialProfiles?: Array<{ + service?: string; + localizedProfile?: string; + url?: string; + username?: string; + userId?: string; + label: string; + id: string; + }>; + instantMessageAddresses?: Array<{ + service?: string; + username?: string; + localizedService?: string; + label: string; + id: string; + }>; + urls?: { + label: string; + url?: string; + id: string; + }; + company?: string; + jobTitle?: string; + department?: string; + imageAvailable?: boolean; + image?: { + uri?: string; + }; + thumbnail?: { + uri?: string; + }; + note?: string; + dates?: Array<{ + day?: number; + month?: number; + year?: number; + id: string; + label: string; + }>; + relationships?: Array<{ + label: string; + name?: string; + id: string; + }>; + } + + interface Response { + data: Contact[]; + total: number; + hasNextPage: boolean; + hasPreviousPage: boolean; + } + + function getContactsAsync(options: Options): Promise; + function getContactByIdAsync(options: { id?: string; fields?: FieldType[] }): Promise; +} + +/** + * DocumentPicker + */ +export namespace DocumentPicker { + interface Options { + type?: string; + } + type Response = { + type: 'success'; + uri: string; + name: string; + size: number; + } | { + type: 'cancel'; }; + function getDocumentAsync(options?: Options): Promise; +} + +/** + * ErrorRecovery + */ +export namespace ErrorRecovery { + function setRecoveryProps(props: HashMap): void; +} + +/** + * Facebook + */ +export namespace Facebook { + interface Options { + permissions?: string[]; + behavior?: 'web' | 'native' | 'browser' | 'system'; + } + type Response = { + type: 'success'; + token: string; + expires: number; + } | { + type: 'cancel'; + }; + function logInWithReadPermissionsAsync(appId: string, options?: Options): Promise; +} + +/** + * Facebook Ads + */ +export namespace FacebookAds { /** - * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. + * Interstitial Ads + */ + namespace InterstitialAdManager { + function showAd(placementId: string): Promise; + } + + /** + * Native Ads + */ + type MediaCachePolicy = 'none' | 'icon' | 'image' | 'all'; + class NativeAdsManager { + constructor(placementId: string, numberOfAdsToRequest?: number); + disableAutoRefresh(): void; + setMediaCachePolicy(cachePolicy: MediaCachePolicy): void; + } + + function withNativeAd(component: Component<{ + icon?: string; + coverImage?: string; + title?: string; + subtitle?: string; + description?: string; + callToActionText?: string; + socialContext?: string; + }>): Component<{ adsManager: NativeAdsManager }, { ad: any, canRequestAds: boolean }>; + + /** + * Banner View + */ + type AdType = 'large' | 'rectangle' | 'standard'; + + interface BannerViewProps { + type: AdType; + placementId: string; + onPress: () => void; + onError: () => void; + } + + class BannerView extends Component { } + + /** + * Ad Settings + */ + namespace AdSettings { + const currentDeviceHash: string; + function addTestDevice(device: string): void; + function clearTestDevices(): void; + type SDKLogLevel = 'none' | 'debug' | 'verbose' | 'warning' | 'error' | 'notification'; + function setLogLevel(logLevel: SDKLogLevel): void; + function setIsChildDirected(isDirected: boolean): void; + function setMediationService(mediationService: string): void; + function setUrlPrefix(urlPrefix: string): void; + } +} + +/** + * FaceDetector + */ +export namespace FaceDetector { + interface Point { + x: Axis; + y: Axis; + } + interface FaceFeature { + bounds: { + size: { + width: number; + height: number; + }, + origin: Point; + }; + smilingProbability?: number; + leftEarPosition?: Point; + rightEarPosition?: Point; + leftEyePosition?: Point; + leftEyeOpenProbability?: number; + rightEyePosition?: Point; + rightEyeOpenProbability?: number; + leftCheekPosition?: Point; + rightCheekPosition?: Point; + leftMouthPosition?: Point; + mouthPosition?: Point; + rightMouthPosition?: Point; + bottomMouthPosition?: Point; + noseBasePosition?: Point; + yawAngle?: number; + rollAngle?: number; + } + interface DetectFaceResult { + faces: FaceFeature[]; + image: { + uri: string; + width: number; + height: number; + orientation: number; + }; + } + interface Mode { + fast: 'fast'; + accurate: 'accurate'; + } + interface _Shared { + all: 'all'; + none: 'none'; + } + type Landmarks = _Shared; + type Classifications = _Shared; + interface _Constants { + Mode: Mode; + Landmarks: Landmarks; + Classifications: Classifications; + } + + const Constants: _Constants; + + interface DetectionOptions { + mode?: keyof Mode; + detectLandmarks?: keyof Landmarks; + runClassifications?: keyof Classifications; + } + + function detectFaces(uri: string, options?: DetectionOptions): Promise; +} + +/** + * FileSystem + */ +export namespace FileSystem { + type FileInfo = { + exists: true; + isDirectory: boolean; + uri: string; + size: number; + modificationTime: number; + md5?: Md5; + } | { + exists: false; + isDirectory: false; + }; + + interface DownloadResult { + uri: string; + status: number; + headers: { [name: string]: string }; + md5?: Md5; + } + + const documentDirectory: string; + const cacheDirectory: string; + + function getInfoAsync(fileUri: string, options?: { md5?: string, size?: boolean; }): Promise; + function readAsStringAsync(fileUri: string): Promise; + function writeAsStringAsync(fileUri: string, contents: string): Promise; + function deleteAsync(fileUri: string, options?: { idempotent: boolean; }): Promise; + function moveAsync(options: { from: string, to: string; }): Promise; + function copyAsync(options: { from: string, to: string; }): Promise; + function makeDirectoryAsync(dirUri: string, options?: { intermediates: boolean }): Promise; + function readDirectoryAsync(dirUri: string): Promise; + function downloadAsync(uri: string, fileUri: string, options?: { md5?: boolean; }): Promise; + function createDownloadResumable( + uri: string, + fileUri: string, + options?: DownloadOptions, + callback?: (totalBytesWritten: number, totalBytesExpectedToWrite: number) => void, + resumeData?: string | null + ): DownloadResumable; + + interface PauseResult { + url: string; + fileUri: string; + options: { md5: boolean; }; + resumeData: string; + } + + interface DownloadOptions { + md5?: boolean; + headers?: { [name: string]: string }; + } + + interface DownloadProgressData { + totalBytesWritten: number; + totalBytesExpectedToWrite: number; + } + + type DownloadProgressCallback = (data: DownloadProgressData) => void; + + class DownloadResumable { + constructor( + url: string, + fileUri: string, + options: DownloadOptions, + callback?: DownloadProgressCallback, + resumeData?: string + ); + + downloadAsync(): Promise; + pauseAsync(): Promise; + resumeAsync(): Promise; + savable(): PauseResult; + } +} + +/** Use TouchID/FaceID (iOS) or the Fingerprint API (Android) to authenticate the user with a fingerprint scan. */ +export namespace Fingerprint { + type FingerprintAuthenticationResult = { + success: true + } | { + success: false, + + /** Error code in the case where authentication fails. */ + error: string + }; + + /** Determine whether the Fingerprint scanner is available on the device. */ + function hasHardwareAsync(): Promise; + + /** Determine whether the device has saved fingerprints to use for authentication. */ + function isEnrolledAsync(): Promise; + + /** + * Attempts to authenticate via Fingerprint. Android: When using the fingerprint module on Android, you need to provide a UI component to prompt the user to scan their fingerprint, as the OS has no default alert for it. * - * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. + * @param promptMessage A message that is shown alongside the TouchID/FaceID prompt. (iOS only) */ - export class AppLoading extends Component { } - // #endregion AppLoading + function authenticateAsync(promptMessageIOS?: string): Promise; - // #region BarCodeScanner - /** - * BarCodeScanner - */ - export interface BarCodeScannerProps extends ViewProperties { - type?: 'front' | 'back'; - torchMode?: 'on' | 'off'; - barCodeTypes?: string[]; - onBarCodeRead?: BarCodeReadCallback; + /** Cancels the fingerprint authentication flow. (Android only) */ + function cancelAuthenticate(): void; +} + +/** + * Font + */ +export namespace Font { + interface FontMap { + [name: string]: RequireSource; } - export class BarCodeScanner extends Component { } - // #endregion + function loadAsync(name: string, url: string): Promise; + function loadAsync(map: FontMap): Promise; +} - // #region BlurView - /** - * BlurView - */ - export interface BlurViewProps extends ViewProperties { - tint: 'light' | 'default' | 'dark'; - intensity: number; - } - export class BlurView extends Component { } - // #endregion +// #region GLView +/** + * GLView + */ +export interface GLViewProps extends ViewProperties { + onContextCreate(): void; + msaaSamples: number; +} +export class GLView extends Component { } +// #endregion - /** - * Brightness - */ - export namespace Brightness { - function setBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; - function getBrightnessAsync(): Promise; - function getSystemBrightnessAsync(): Promise; - function setSystemBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; +/** + * Google + */ +export namespace Google { + interface LogInConfig { + androidClientId?: string; + androidStandaloneAppClientId?: string; + iosClientId?: string; + iosStandaloneAppClientId?: string; + webClientId?: string; + behavior?: 'system' | 'web'; + scopes?: string[]; } - // #region Camera - /** - * Camera - */ - interface PictureOptions { - quality?: number; + type LogInResult = { + type: 'cancel'; + } | { + type: 'success'; + accessToken: string; + idToken?: string; + refreshToken?: string; + serverAuthCode?: string; + user: { + id: string; + name: string; + givenName: string; + familyName: string; + photoUrl?: string; + email?: string; + } + }; + + function logInAsync(config: LogInConfig): Promise; +} + +/** Access the device gyroscope sensor to respond to changes in rotation in 3d space. */ +export namespace Gyroscope { + interface GyroscopeObject { + x: Axis; + y: Axis; + z: Axis; } - export interface PictureResponse { + + /** A callback that is invoked when an gyroscope update is available. */ + function addListener(listener: (obj: GyroscopeObject) => any): EventSubscription; + + /** Remove all listeners. */ + function removeAllListeners(): void; + + /** Subscribe for updates to the gyroscope. */ + function setUpdateInterval(intervalMs: number): void; +} + +/** + * ImageManipulator + */ +export namespace ImageManipulator { + interface ImageResult { uri: string; width: number; height: number; - exif: string; - base64: string; + base64?: string; } - export interface RecordingOptions { - quality?: string | number; - maxDuration?: number; - maxFileSize?: number; + interface SaveOptions { + base64?: boolean; + compress?: FloatFromZeroToOne; + format?: 'jpeg' | 'png'; } - export class CameraObject { - takePictureAsync(options: PictureOptions): Promise; - recordAsync(options: RecordingOptions): Promise<{ uri: string; }>; - stopRecording(): void; - getSupportedRatiosAsync(): Promise; // Android only + interface CropParameters { + originX: number; + originY: number; + width: number; + height: number; } - export interface CameraProps extends ViewProperties { - flashMode?: string | number; - type?: string | number; - ratio?: string; - autoFocus?: string | number | boolean; - focusDepth?: FloatFromZeroToOne; - zoom?: FloatFromZeroToOne; - whiteBalance?: string | number; - barCodeTypes?: string[]; - onCameraReady?: () => void; - onMountError?: () => void; - onBarCodeRead?: BarCodeReadCallback; - ref?: Ref; + interface ImageManipulationOptions { + resize?: { width?: number; height?: number }; + rotate?: number; + flip?: { vertical?: boolean; horizontal?: boolean }; + crop?: CropParameters; } - interface CameraConstants { - readonly Type: string; - readonly FlashMode: string; - readonly AutoFocus: string; - readonly WhiteBalance: string; - readonly VideoQuality: string; - readonly BarCodeType: string; - } - export class Camera extends Component { - static readonly Constants: CameraConstants; - } - // #endregion + function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; +} - /** - * Constants - */ - export namespace Constants { - const appOwnership: 'expo' | 'standalone' | 'guest'; - const expoVersion: string; - const deviceId: string; - const deviceName: string; - const deviceYearClass: number; - const isDevice: boolean; +/** + * Image Picker + */ +export namespace ImagePicker { + interface ImageInfo { + uri: string; + width: number; + height: number; + } - interface Platform { - ios: { - platform: string; - model: string; - userInterfaceIdiom: string; - }; - } - const platform: Platform; - const sessionId: string; - const statusBarHeight: number; - const systemFonts: string[]; + type ImageResult = { cancelled: true } | ({ cancelled: false } & ImageInfo); - interface Manifest { - name: string; - description?: string; - slug?: string; - sdkVersion?: string; - version?: string; - orientation?: Orientation; - primaryColor?: string; - privacy?: 'public' | 'unlisted'; - scheme?: string; + interface _MediaTypeOptions { + All: 'All'; + Videos: 'Videos'; + Images: 'Images'; + } + + const MediaTypeOptions: _MediaTypeOptions; + + interface ImageLibraryOptions { + allowsEditing?: boolean; + aspect?: [number, number]; + quality?: number; + mediaTypes?: keyof _MediaTypeOptions; + } + + function launchImageLibraryAsync(options?: ImageLibraryOptions): Promise; + + interface CameraOptions { + allowsEditing?: boolean; + aspect?: [number, number]; + quality?: number; + } + function launchCameraAsync(options?: CameraOptions): Promise; +} + +/** + * IntentLauncherAndroid + */ +export namespace IntentLauncherAndroid { + const ACTION_ACCESSIBILITY_SETTINGS: string; + const ACTION_APP_NOTIFICATION_REDACTION: string; + const ACTION_CONDITION_PROVIDER_SETTINGS: string; + const ACTION_NOTIFICATION_LISTENER_SETTINGS: string; + const ACTION_PRINT_SETTINGS: string; + const ACTION_ADD_ACCOUNT_SETTINGS: string; + const ACTION_AIRPLANE_MODE_SETTINGS: string; + const ACTION_APN_SETTINGS: string; + const ACTION_APPLICATION_DETAILS_SETTINGS: string; + const ACTION_APPLICATION_DEVELOPMENT_SETTINGS: string; + const ACTION_APPLICATION_SETTINGS: string; + const ACTION_APP_NOTIFICATION_SETTINGS: string; + const ACTION_APP_OPS_SETTINGS: string; + const ACTION_BATTERY_SAVER_SETTINGS: string; + const ACTION_BLUETOOTH_SETTINGS: string; + const ACTION_CAPTIONING_SETTINGS: string; + const ACTION_CAST_SETTINGS: string; + const ACTION_DATA_ROAMING_SETTINGS: string; + const ACTION_DATE_SETTINGS: string; + const ACTION_DEVICE_INFO_SETTINGS: string; + const ACTION_DEVICE_NAME: string; + const ACTION_DISPLAY_SETTINGS: string; + const ACTION_DREAM_SETTINGS: string; + const ACTION_HARD_KEYBOARD_SETTINGS: string; + const ACTION_HOME_SETTINGS: string; + const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS: string; + const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS: string; + const ACTION_INPUT_METHOD_SETTINGS: string; + const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS: string; + const ACTION_INTERNAL_STORAGE_SETTINGS: string; + const ACTION_LOCALE_SETTINGS: string; + const ACTION_LOCATION_SOURCE_SETTINGS: string; + const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS: string; + const ACTION_MANAGE_APPLICATIONS_SETTINGS: string; + const ACTION_MANAGE_DEFAULT_APPS_SETTINGS: string; + const ACTION_MEMORY_CARD_SETTINGS: string; + const ACTION_MONITORING_CERT_INFO: string; + const ACTION_NETWORK_OPERATOR_SETTINGS: string; + const ACTION_NFCSHARING_SETTINGS: string; + const ACTION_NFC_PAYMENT_SETTINGS: string; + const ACTION_NFC_SETTINGS: string; + const ACTION_NIGHT_DISPLAY_SETTINGS: string; + const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS: string; + const ACTION_NOTIFICATION_SETTINGS: string; + const ACTION_PAIRING_SETTINGS: string; + const ACTION_PRIVACY_SETTINGS: string; + const ACTION_QUICK_LAUNCH_SETTINGS: string; + const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: string; + const ACTION_SECURITY_SETTINGS: string; + const ACTION_SETTINGS: string; + const ACTION_SHOW_ADMIN_SUPPORT_DETAILS: string; + const ACTION_SHOW_INPUT_METHOD_PICKER: string; + const ACTION_SHOW_REGULATORY_INFO: string; + const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG: string; + const ACTION_SOUND_SETTINGS: string; + const ACTION_STORAGE_MANAGER_SETTINGS: string; + const ACTION_SYNC_SETTINGS: string; + const ACTION_SYSTEM_UPDATE_SETTINGS: string; + const ACTION_TETHER_PROVISIONING_UI: string; + const ACTION_TRUSTED_CREDENTIALS_USER: string; + const ACTION_USAGE_ACCESS_SETTINGS: string; + const ACTION_USER_DICTIONARY_INSERT: string; + const ACTION_USER_DICTIONARY_SETTINGS: string; + const ACTION_USER_SETTINGS: string; + const ACTION_VOICE_CONTROL_AIRPLANE_MODE: string; + const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE: string; + const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE: string; + const ACTION_VOICE_INPUT_SETTINGS: string; + const ACTION_VPN_SETTINGS: string; + const ACTION_VR_LISTENER_SETTINGS: string; + const ACTION_WEBVIEW_SETTINGS: string; + const ACTION_WIFI_IP_SETTINGS: string; + const ACTION_WIFI_SETTINGS: string; + const ACTION_WIRELESS_SETTINGS: string; + const ACTION_ZEN_MODE_AUTOMATION_SETTINGS: string; + const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS: string; + const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS: string; + const ACTION_ZEN_MODE_PRIORITY_SETTINGS: string; + const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS: string; + const ACTION_ZEN_MODE_SETTINGS: string; + + function startActivityAsync(activity: string, data?: HashMap): Promise; +} + +/** + * KeepAwake + */ +export class KeepAwake extends Component { + static activate(): void; + static deactivate(): void; +} + +// #region LinearGradient +/** + * LinearGradient + */ +export interface LinearGradientProps { + colors: string[]; + start: [number, number]; + end: [number, number]; + locations: number[]; +} + +export class LinearGradient extends Component { } +// #endregion + +/** + * Location + */ +export namespace Location { + interface LocationOptions { + enableHighAccuracy?: boolean; + timeInterval?: number; + distanceInterval?: number; + } + + interface LocationProps { + latitude: number; + longitude: number; + } + + interface Coords extends LocationProps { + altitude: number; + accuracy: number; + } + + interface LocationData { + coords: { + heading: number; + speed: number + } & Coords; + timestamp: number; + } + + interface ProviderStatus { + locationServicesEnabled: boolean; + gpsAvailable?: boolean; + networkAvailable?: boolean; + passiveAvailable?: boolean; + } + + interface HeadingStatus { + magHeading: number; + trueHeading: number; + accuracy: number; + } + + interface GeocodeData { + city: string; + street: string; + region: string; + postalCode: string; + country: string; + name: string; + } + + type LocationCallback = (data: LocationData) => void; + + function getCurrentPositionAsync(options: LocationOptions): Promise; + function watchPositionAsync(options: LocationOptions, callback: LocationCallback): EventSubscription; + function getProviderStatusAsync(): Promise; + function getHeadingAsync(): Promise; + function watchHeadingAsync(callback: (status: HeadingStatus) => void): EventSubscription; + function geocodeAsync(address: string): Promise; + function reverseGeocodeAsync(location: LocationProps): Promise; + function setApiKey(key: string): void; +} + +/** + * Magnetometer + */ +export namespace Magnetometer { + interface MagnetometerObject { + x: Axis; + y: Axis; + z: Axis; + } + + function addListener(listener: (obj: MagnetometerObject) => any): EventSubscription; + function removeAllListeners(): void; + function setUpdateInterval(intervalMs: number): void; +} + +/** + * Notifications + */ +export namespace Notifications { + interface Notification { + origin: 'selected' | 'received'; + data: any; + remote: boolean; + isMultiple: boolean; + } + + interface LocalNotification { + title: string; + body?: string; + data?: any; + ios?: { + sound?: boolean + }; + android?: { + sound?: boolean; icon?: string; - platforms?: string[]; - githubUrl?: string; - notification?: { - icon?: string, - color?: string, - androidMode?: 'default' | 'collapse', - androidCollapsedTitle?: string - }; - loading?: { - icon?: string, - exponentIconColor?: 'white' | 'blue', - exponentIconGrayscale?: 1 | 0, - backgroundImage?: string, - backgroundColor?: string, - hideExponentText?: boolean - }; - appKey?: string; - androidStatusBar?: { - barStyle?: 'lignt-content' | 'dark-content', - backgroundColor?: string - }; - androidShowExponentNotificationInShellApp?: boolean; - extra?: { - [propName: string]: any - }; - rnCliPath?: any; - entryPoint?: string; - packagerOpts?: { - hostType?: string, - dev?: boolean, - strict?: boolean, - minify?: boolean, - urlType?: string, - urlRandomness?: string, - lanType?: string, - [propName: string]: any - }; - ignoreNodeModulesValidation?: any; - nodeModulesPath?: string; - ios?: { - bundleIdentifier?: string, - buildNumber?: string, - config?: { - usesNonExemptEncryption?: boolean, - googleSignIn?: { - reservedClientId: string - } - }, - supportsTablet?: boolean, - infoPlist?: any - }; - android?: { - package?: string, - versionCode?: string, - config?: { - fabric?: { - apiKey: string, - buildSecret: string - }, - googleMaps?: { - apiKey: string - }, - googleSignIn?: { - apiKey: string, - certificateHash: string - } - } - }; - facebookScheme?: any; - facebookAppId?: string; - facebookDisplayName?: string; - splash?: { - backgroundColor?: string; - resizeMode?: ResizeModeContain | ResizeModeCover; - image?: string; - }; - assetBundlePatterns?: string[]; - releaseChannel: string; - [propName: string]: any; - } - const manifest: Manifest; - const linkingUri: string; + color?: string; + priority?: 'min' | 'low' | 'high' | 'max'; + sticky?: boolean; + vibrate?: boolean | number[]; + link?: string; + }; } - /** - * Contacts - */ - export namespace Contacts { - type PhoneNumbers = 'phoneNumbers'; - type Emails = 'emails'; - type Addresses = 'addresses'; - type Image = 'image'; - type Thumbnail = 'thumbnail'; - type Note = 'note'; - type Birthday = 'birthday'; - type NonGregorianBirthday = 'nonGregorianBirthday'; - type NamePrefix = 'namePrefix'; - type NameSuffix = 'nameSuffix'; - type PhoneticFirstName = 'phoneticFirstName'; - type PhoneticMiddleName = 'phoneticMiddleName'; - type PhoneticLastName = 'phoneticLastName'; - type SocialProfiles = 'socialProfiles'; - type InstantMessageAddresses = 'instantMessageAddresses'; - type UrlAddresses = 'urlAddresses'; - type Dates = 'dates'; - type Relationships = 'relationships'; + type LocalNotificationId = string | number; - const PHONE_NUMBERS: PhoneNumbers; - const EMAILS: Emails; - const ADDRESSES: Addresses; - const IMAGE: Image; - const THUMBNAIL: Thumbnail; - const NOTE: Note; - const BIRTHDAY: Birthday; - const NON_GREGORIAN_BIRTHDAY: NonGregorianBirthday; - const NAME_PREFIX: NamePrefix; - const NAME_SUFFIX: NameSuffix; - const PHONETIC_FIRST_NAME: PhoneticFirstName; - const PHONETIC_MIDDLE_NAME: PhoneticMiddleName; - const PHONETIC_LAST_NAME: PhoneticLastName; - const SOCIAL_PROFILES: SocialProfiles; - const IM_ADDRESSES: InstantMessageAddresses; - const URLS: UrlAddresses; - const DATES: Dates; - const RELATIONSHIPS: Relationships; + function addListener(listener: (notification: Notification) => any): EventSubscription; + function getExponentPushTokenAsync(): Promise; + function presentLocalNotificationAsync(localNotification: LocalNotification): Promise; + function scheduleLocalNotificationAsync( + localNotification: LocalNotification, + schedulingOptions: { time: Date | number, repeat?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year' } + ): Promise; + function dismissNotificationAsync(localNotificationId: LocalNotificationId): Promise; + function dismissAllNotificationsAsync(): Promise; + function cancelScheduledNotificationAsync(localNotificationId: LocalNotificationId): Promise; + function cancelAllScheduledNotificationsAsync(): Promise; + function getBadgeNumberAsync(): Promise; + function setBadgeNumberAsync(number: number): Promise; +} - type FieldType = PhoneNumbers | Emails | Addresses | Image | Thumbnail | - Note | Birthday | NonGregorianBirthday | NamePrefix | NameSuffix | - PhoneticFirstName | PhoneticMiddleName | PhoneticLastName | SocialProfiles | - InstantMessageAddresses | UrlAddresses | Dates | Relationships; +/** + * Pedometer + */ +export namespace Pedometer { + function isAvailableAsync(): Promise; + function getStepCountAsync(start: Date, end: Date): Promise<{ steps: number; }>; + function watchStepCount(callback: (params: { steps: number; }) => void): EventSubscription; +} - interface Options { - pageSize?: number; - pageOffset?: number; - fields?: FieldType[]; - } - - interface Contact { - id: string; - contactType: string; - name: string; - firstName?: string; - middleName?: string; - lastName?: string; - previousLastName?: string; - namePrefix?: string; - nameSuffix?: string; - nickname?: string; - phoneticFirstName?: string; - phoneticMiddleName?: string; - phoneticLastName?: string; - emails?: Array<{ - email?: string; - primary?: boolean; - label: string; - id: string; - }>; - phoneNumbers?: Array<{ - number?: string; - primary?: boolean; - digits?: string; - countryCode?: string; - label: string; - id: string; - }>; - addresses?: Array<{ - street?: string; - city?: string; - country?: string; - region?: string; - neighborhood?: string; - postalCode?: string; - poBox?: string; - isoCountryCode?: string; - label: string; - id: string; - }>; - socialProfiles?: Array<{ - service?: string; - localizedProfile?: string; - url?: string; - username?: string; - userId?: string; - label: string; - id: string; - }>; - instantMessageAddresses?: Array<{ - service?: string; - username?: string; - localizedService?: string; - label: string; - id: string; - }>; - urls?: { - label: string; - url?: string; - id: string; - }; - company?: string; - jobTitle?: string; - department?: string; - imageAvailable?: boolean; - image?: { - uri?: string; - }; - thumbnail?: { - uri?: string; - }; - note?: string; - dates?: Array<{ - day?: number; - month?: number; - year?: number; - id: string; - label: string; - }>; - relationships?: Array<{ - label: string; - name?: string; - id: string; - }>; - } - - interface Response { - data: Contact[]; - total: number; - hasNextPage: boolean; - hasPreviousPage: boolean; - } - - function getContactsAsync(options: Options): Promise; - function getContactByIdAsync(options: { id?: string; fields?: FieldType[] }): Promise; +/** + * Permissions + */ +export namespace Permissions { + type PermissionType = 'remoteNotifications' | 'location' | + 'camera' | 'contacts' | 'audioRecording'; + type PermissionStatus = 'undetermined' | 'granted' | 'denied'; + type PermissionExpires = 'never'; + interface PermissionDetailsLocationIOS { + scope: 'whenInUse' | 'always'; + } + interface PermissionDetailsLocationAndroid { + scope: 'fine' | 'coarse' | 'none'; + } + interface PermissionResponse { + status: PermissionStatus; + expires: PermissionExpires; + ios?: PermissionDetailsLocationIOS; + android?: PermissionDetailsLocationAndroid; } - /** - * DocumentPicker - */ - export namespace DocumentPicker { - interface Options { - type?: string; - } - type Response = { - type: 'success'; - uri: string; - name: string; - size: number; - } | { - type: 'cancel'; - }; + function getAsync(type: PermissionType): Promise; + function askAsync(type: PermissionType): Promise; - function getDocumentAsync(options?: Options): Promise; + const CAMERA: string; + const CAMERA_ROLL: string; + const AUDIO_RECORDING: string; + const LOCATION: string; + const REMOTE_NOTIFICATIONS: string; + const NOTIFICATIONS: string; + const CONTACTS: string; +} + +/** + * Register Root Component + */ +export function registerRootComponent(component: Component): Component; + +/** + * ScreenOrientation + */ +export namespace ScreenOrientation { + interface Orientation { + ALL: 'ALL'; + ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN'; + PORTRAIT: 'PORTRAIT'; + PORTRAIT_UP: 'PORTRAIT_UP'; + PORTRAIT_DOWN: 'PORTRAIT_DOWN'; + LANDSCAPE: 'LANDSCAPE'; + LANDSCAPE_LEFT: 'LANDSCAPE_LEFT'; + LANDSCAPE_RIGHT: 'LANDSCAPE_RIGHT'; + } + const Orientation: Orientation; + function allow(orientation: string): void; +} + +/** + * SecureStore + */ +export namespace SecureStore { + interface SecureStoreOptions { + keychainService?: string; + keychainAccessible?: number; + } + function setItemAsync(key: string, value: string, options?: SecureStoreOptions): Promise; + function getItemAsync(key: string, options?: SecureStoreOptions): Promise; + function deleteItemAsync(key: string, options?: SecureStoreOptions): Promise; +} + +/** + * Segment + */ +export namespace Segment { + function initialize(keys: { + androidWriteKey: string; + iosWriteKey: string; + }): void; + function identify(userId: string): void; + function identifyWithTraits(userId: string, traits: object): void; + function track(event: string): void; + function reset(): void; + function trackWithProperties(event: string, properties: object): void; + function screen(screenName: string): void; + function screenWithProperties(screenName: string, properties: object): void; + function flush(): void; +} + +/** + * Speech + */ +export namespace Speech { + interface SpeechOptions { + language?: string; + pitch?: number; + rate?: number; + onStart?: () => void; + onStopped?: () => void; + onDone?: () => void; + onError?: (error: string) => void; } - /** - * ErrorRecovery - */ - export namespace ErrorRecovery { - function setRecoveryProps(props: HashMap): void; + function speak(text: string, options?: SpeechOptions): void; + function stop(): void; + function isSpeakingAsync(): Promise; +} + +/** + * SQLite + */ +export namespace SQLite { + type Error = any; + + interface Database { + transaction( + callback: (transaction: Transaction) => any, + error?: (error: Error) => any, // TODO def of error + success?: () => any + ): void; } - /** - * Facebook - */ - export namespace Facebook { - interface Options { - permissions?: string[]; - behavior?: 'web' | 'native' | 'browser' | 'system'; - } - type Response = { - type: 'success'; - token: string; - expires: number; - } | { - type: 'cancel'; - }; - function logInWithReadPermissionsAsync(appId: string, options?: Options): Promise; + interface Transaction { + executeSql( + sqlStatement: string, + arguments?: string[] | number[], + success?: (transaction: Transaction, resultSet: ResultSet) => any, + error?: (transaction: Transaction, error: Error) => any + ): void; } - /** - * Facebook Ads - */ - export namespace FacebookAds { - /** - * Interstitial Ads - */ - namespace InterstitialAdManager { - function showAd(placementId: string): Promise; - } - - /** - * Native Ads - */ - type MediaCachePolicy = 'none' | 'icon' | 'image' | 'all'; - class NativeAdsManager { - constructor(placementId: string, numberOfAdsToRequest?: number); - disableAutoRefresh(): void; - setMediaCachePolicy(cachePolicy: MediaCachePolicy): void; - } - - function withNativeAd(component: Component<{ - icon?: string; - coverImage?: string; - title?: string; - subtitle?: string; - description?: string; - callToActionText?: string; - socialContext?: string; - }>): Component<{ adsManager: NativeAdsManager }, { ad: any, canRequestAds: boolean }>; - - /** - * Banner View - */ - type AdType = 'large' | 'rectangle' | 'standard'; - - interface BannerViewProps { - type: AdType; - placementId: string; - onPress: () => void; - onError: () => void; - } - - class BannerView extends Component { } - - /** - * Ad Settings - */ - namespace AdSettings { - const currentDeviceHash: string; - function addTestDevice(device: string): void; - function clearTestDevices(): void; - type SDKLogLevel = 'none' | 'debug' | 'verbose' | 'warning' | 'error' | 'notification'; - function setLogLevel(logLevel: SDKLogLevel): void; - function setIsChildDirected(isDirected: boolean): void; - function setMediationService(mediationService: string): void; - function setUrlPrefix(urlPrefix: string): void; - } + interface ResultSet { + insertId: number; + rowAffected: number; + rows: { + length: number; + item: (index: number) => any; + _array: HashMap[]; + }; } - /** - * FaceDetector - */ - export namespace FaceDetector { - interface Point { - x: Axis; - y: Axis; - } - interface FaceFeature { - bounds: { - size: { - width: number; - height: number; - }, - origin: Point; - }; - smilingProbability?: number; - leftEarPosition?: Point; - rightEarPosition?: Point; - leftEyePosition?: Point; - leftEyeOpenProbability?: number; - rightEyePosition?: Point; - rightEyeOpenProbability?: number; - leftCheekPosition?: Point; - rightCheekPosition?: Point; - leftMouthPosition?: Point; - mouthPosition?: Point; - rightMouthPosition?: Point; - bottomMouthPosition?: Point; - noseBasePosition?: Point; - yawAngle?: number; - rollAngle?: number; - } - interface DetectFaceResult { - faces: FaceFeature[]; - image: { - uri: string; - width: number; - height: number; - orientation: number; - }; - } - interface Mode { - fast: 'fast'; - accurate: 'accurate'; - } - interface _Shared { - all: 'all'; - none: 'none'; - } - type Landmarks = _Shared; - type Classifications = _Shared; - interface _Constants { - Mode: Mode; - Landmarks: Landmarks; - Classifications: Classifications; - } - - const Constants: _Constants; - - interface DetectionOptions { - mode?: keyof Mode; - detectLandmarks?: keyof Landmarks; - runClassifications?: keyof Classifications; - } - - function detectFaces(uri: string, options?: DetectionOptions): Promise; - } - - /** - * FileSystem - */ - export namespace FileSystem { - type FileInfo = { - exists: true; - isDirectory: boolean; - uri: string; - size: number; - modificationTime: number; - md5?: Md5; - } | { - exists: false; - isDirectory: false; - }; - - interface DownloadResult { - uri: string; - status: number; - headers: { [name: string]: string }; - md5?: Md5; - } - - const documentDirectory: string; - const cacheDirectory: string; - - function getInfoAsync(fileUri: string, options?: { md5?: string, size?: boolean; }): Promise; - function readAsStringAsync(fileUri: string): Promise; - function writeAsStringAsync(fileUri: string, contents: string): Promise; - function deleteAsync(fileUri: string, options?: { idempotent: boolean; }): Promise; - function moveAsync(options: { from: string, to: string; }): Promise; - function copyAsync(options: { from: string, to: string; }): Promise; - function makeDirectoryAsync(dirUri: string, options?: { intermediates: boolean }): Promise; - function readDirectoryAsync(dirUri: string): Promise; - function downloadAsync(uri: string, fileUri: string, options?: { md5?: boolean; }): Promise; - function createDownloadResumable( - uri: string, - fileUri: string, - options?: DownloadOptions, - callback?: (totalBytesWritten: number, totalBytesExpectedToWrite: number) => void, - resumeData?: string | null - ): DownloadResumable; - - interface PauseResult { - url: string; - fileUri: string; - options: { md5: boolean; }; - resumeData: string; - } - - interface DownloadOptions { - md5?: boolean; - headers?: { [name: string]: string }; - } - - interface DownloadProgressData { - totalBytesWritten: number; - totalBytesExpectedToWrite: number; - } - - type DownloadProgressCallback = (data: DownloadProgressData) => void; - - class DownloadResumable { - constructor( - url: string, - fileUri: string, - options: DownloadOptions, - callback?: DownloadProgressCallback, - resumeData?: string - ); - - downloadAsync(): Promise; - pauseAsync(): Promise; - resumeAsync(): Promise; - savable(): PauseResult; - } - } - - /** Use TouchID/FaceID (iOS) or the Fingerprint API (Android) to authenticate the user with a fingerprint scan. */ - export namespace Fingerprint { - type FingerprintAuthenticationResult = { - success: true - } | { - success: false, - - /** Error code in the case where authentication fails. */ - error: string - }; - - /** Determine whether the Fingerprint scanner is available on the device. */ - function hasHardwareAsync(): Promise; - - /** Determine whether the device has saved fingerprints to use for authentication. */ - function isEnrolledAsync(): Promise; - - /** - * Attempts to authenticate via Fingerprint. Android: When using the fingerprint module on Android, you need to provide a UI component to prompt the user to scan their fingerprint, as the OS has no default alert for it. - * - * @param promptMessage A message that is shown alongside the TouchID/FaceID prompt. (iOS only) - */ - function authenticateAsync(promptMessageIOS?: string): Promise; - - /** Cancels the fingerprint authentication flow. (Android only) */ - function cancelAuthenticate(): void; - } - - /** - * Font - */ - export namespace Font { - interface FontMap { - [name: string]: RequireSource; - } - - function loadAsync(name: string, url: string): Promise; - function loadAsync(map: FontMap): Promise; - } - - // #region GLView - /** - * GLView - */ - export interface GLViewProps extends ViewProperties { - onContextCreate(): void; - msaaSamples: number; - } - export class GLView extends Component { } - // #endregion - - /** - * Google - */ - export namespace Google { - interface LogInConfig { - androidClientId?: string; - androidStandaloneAppClientId?: string; - iosClientId?: string; - iosStandaloneAppClientId?: string; - webClientId?: string; - behavior?: 'system' | 'web'; - scopes?: string[]; - } - - type LogInResult = { - type: 'cancel'; - } | { - type: 'success'; - accessToken: string; - idToken?: string; - refreshToken?: string; - serverAuthCode?: string; - user: { - id: string; - name: string; - givenName: string; - familyName: string; - photoUrl?: string; - email?: string; - } - }; - - function logInAsync(config: LogInConfig): Promise; - } - - /** Access the device gyroscope sensor to respond to changes in rotation in 3d space. */ - export namespace Gyroscope { - interface GyroscopeObject { - x: Axis; - y: Axis; - z: Axis; - } - - /** A callback that is invoked when an gyroscope update is available. */ - function addListener(listener: (obj: GyroscopeObject) => any): EventSubscription; - - /** Remove all listeners. */ - function removeAllListeners(): void; - - /** Subscribe for updates to the gyroscope. */ - function setUpdateInterval(intervalMs: number): void; - } - - /** - * ImageManipulator - */ - export namespace ImageManipulator { - interface ImageResult { - uri: string; - width: number; - height: number; - base64?: string; - } - interface SaveOptions { - base64?: boolean; - compress?: FloatFromZeroToOne; - format?: 'jpeg' | 'png'; - } - interface CropParameters { - originX: number; - originY: number; - width: number; - height: number; - } - interface ImageManipulationOptions { - resize?: { width?: number; height?: number }; - rotate?: number; - flip?: { vertical?: boolean; horizontal?: boolean }; - crop?: CropParameters; - } - function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; - } - - /** - * Image Picker - */ - export namespace ImagePicker { - interface ImageInfo { - uri: string; - width: number; - height: number; - } - - type ImageResult = { cancelled: true } | ({ cancelled: false } & ImageInfo); - - interface _MediaTypeOptions { - All: 'All'; - Videos: 'Videos'; - Images: 'Images'; - } - - const MediaTypeOptions: _MediaTypeOptions; - - interface ImageLibraryOptions { - allowsEditing?: boolean; - aspect?: [number, number]; - quality?: number; - mediaTypes?: keyof _MediaTypeOptions; - } - - function launchImageLibraryAsync(options?: ImageLibraryOptions): Promise; - - interface CameraOptions { - allowsEditing?: boolean; - aspect?: [number, number]; - quality?: number; - } - function launchCameraAsync(options?: CameraOptions): Promise; - } - - /** - * IntentLauncherAndroid - */ - export namespace IntentLauncherAndroid { - const ACTION_ACCESSIBILITY_SETTINGS: string; - const ACTION_APP_NOTIFICATION_REDACTION: string; - const ACTION_CONDITION_PROVIDER_SETTINGS: string; - const ACTION_NOTIFICATION_LISTENER_SETTINGS: string; - const ACTION_PRINT_SETTINGS: string; - const ACTION_ADD_ACCOUNT_SETTINGS: string; - const ACTION_AIRPLANE_MODE_SETTINGS: string; - const ACTION_APN_SETTINGS: string; - const ACTION_APPLICATION_DETAILS_SETTINGS: string; - const ACTION_APPLICATION_DEVELOPMENT_SETTINGS: string; - const ACTION_APPLICATION_SETTINGS: string; - const ACTION_APP_NOTIFICATION_SETTINGS: string; - const ACTION_APP_OPS_SETTINGS: string; - const ACTION_BATTERY_SAVER_SETTINGS: string; - const ACTION_BLUETOOTH_SETTINGS: string; - const ACTION_CAPTIONING_SETTINGS: string; - const ACTION_CAST_SETTINGS: string; - const ACTION_DATA_ROAMING_SETTINGS: string; - const ACTION_DATE_SETTINGS: string; - const ACTION_DEVICE_INFO_SETTINGS: string; - const ACTION_DEVICE_NAME: string; - const ACTION_DISPLAY_SETTINGS: string; - const ACTION_DREAM_SETTINGS: string; - const ACTION_HARD_KEYBOARD_SETTINGS: string; - const ACTION_HOME_SETTINGS: string; - const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS: string; - const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS: string; - const ACTION_INPUT_METHOD_SETTINGS: string; - const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS: string; - const ACTION_INTERNAL_STORAGE_SETTINGS: string; - const ACTION_LOCALE_SETTINGS: string; - const ACTION_LOCATION_SOURCE_SETTINGS: string; - const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS: string; - const ACTION_MANAGE_APPLICATIONS_SETTINGS: string; - const ACTION_MANAGE_DEFAULT_APPS_SETTINGS: string; - const ACTION_MEMORY_CARD_SETTINGS: string; - const ACTION_MONITORING_CERT_INFO: string; - const ACTION_NETWORK_OPERATOR_SETTINGS: string; - const ACTION_NFCSHARING_SETTINGS: string; - const ACTION_NFC_PAYMENT_SETTINGS: string; - const ACTION_NFC_SETTINGS: string; - const ACTION_NIGHT_DISPLAY_SETTINGS: string; - const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS: string; - const ACTION_NOTIFICATION_SETTINGS: string; - const ACTION_PAIRING_SETTINGS: string; - const ACTION_PRIVACY_SETTINGS: string; - const ACTION_QUICK_LAUNCH_SETTINGS: string; - const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: string; - const ACTION_SECURITY_SETTINGS: string; - const ACTION_SETTINGS: string; - const ACTION_SHOW_ADMIN_SUPPORT_DETAILS: string; - const ACTION_SHOW_INPUT_METHOD_PICKER: string; - const ACTION_SHOW_REGULATORY_INFO: string; - const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG: string; - const ACTION_SOUND_SETTINGS: string; - const ACTION_STORAGE_MANAGER_SETTINGS: string; - const ACTION_SYNC_SETTINGS: string; - const ACTION_SYSTEM_UPDATE_SETTINGS: string; - const ACTION_TETHER_PROVISIONING_UI: string; - const ACTION_TRUSTED_CREDENTIALS_USER: string; - const ACTION_USAGE_ACCESS_SETTINGS: string; - const ACTION_USER_DICTIONARY_INSERT: string; - const ACTION_USER_DICTIONARY_SETTINGS: string; - const ACTION_USER_SETTINGS: string; - const ACTION_VOICE_CONTROL_AIRPLANE_MODE: string; - const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE: string; - const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE: string; - const ACTION_VOICE_INPUT_SETTINGS: string; - const ACTION_VPN_SETTINGS: string; - const ACTION_VR_LISTENER_SETTINGS: string; - const ACTION_WEBVIEW_SETTINGS: string; - const ACTION_WIFI_IP_SETTINGS: string; - const ACTION_WIFI_SETTINGS: string; - const ACTION_WIRELESS_SETTINGS: string; - const ACTION_ZEN_MODE_AUTOMATION_SETTINGS: string; - const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_PRIORITY_SETTINGS: string; - const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_SETTINGS: string; - - function startActivityAsync(activity: string, data?: HashMap): Promise; - } - - /** - * KeepAwake - */ - export class KeepAwake extends Component { - static activate(): void; - static deactivate(): void; - } - - // #region LinearGradient - /** - * LinearGradient - */ - export interface LinearGradientProps { - colors: string[]; - start: [number, number]; - end: [number, number]; - locations: number[]; - } - - export class LinearGradient extends Component { } - // #endregion - - /** - * Location - */ - export namespace Location { - interface LocationOptions { - enableHighAccuracy?: boolean; - timeInterval?: number; - distanceInterval?: number; - } - - interface LocationProps { - latitude: number; - longitude: number; - } - - interface Coords extends LocationProps { - altitude: number; - accuracy: number; - } - - interface LocationData { - coords: { - heading: number; - speed: number - } & Coords; - timestamp: number; - } - - interface ProviderStatus { - locationServicesEnabled: boolean; - gpsAvailable?: boolean; - networkAvailable?: boolean; - passiveAvailable?: boolean; - } - - interface HeadingStatus { - magHeading: number; - trueHeading: number; - accuracy: number; - } - - interface GeocodeData { - city: string; - street: string; - region: string; - postalCode: string; - country: string; - name: string; - } - - type LocationCallback = (data: LocationData) => void; - - function getCurrentPositionAsync(options: LocationOptions): Promise; - function watchPositionAsync(options: LocationOptions, callback: LocationCallback): EventSubscription; - function getProviderStatusAsync(): Promise; - function getHeadingAsync(): Promise; - function watchHeadingAsync(callback: (status: HeadingStatus) => void): EventSubscription; - function geocodeAsync(address: string): Promise; - function reverseGeocodeAsync(location: LocationProps): Promise; - function setApiKey(key: string): void; - } - - /** - * Magnetometer - */ - export namespace Magnetometer { - interface MagnetometerObject { - x: Axis; - y: Axis; - z: Axis; - } - - function addListener(listener: (obj: MagnetometerObject) => any): EventSubscription; - function removeAllListeners(): void; - function setUpdateInterval(intervalMs: number): void; - } - - /** - * Notifications - */ - export namespace Notifications { - interface Notification { - origin: 'selected' | 'received'; - data: any; - remote: boolean; - isMultiple: boolean; - } - - interface LocalNotification { - title: string; - body?: string; - data?: any; - ios?: { - sound?: boolean - }; - android?: { - sound?: boolean; - icon?: string; - color?: string; - priority?: 'min' | 'low' | 'high' | 'max'; - sticky?: boolean; - vibrate?: boolean | number[]; - link?: string; - }; - } - - type LocalNotificationId = string | number; - - function addListener(listener: (notification: Notification) => any): EventSubscription; - function getExponentPushTokenAsync(): Promise; - function presentLocalNotificationAsync(localNotification: LocalNotification): Promise; - function scheduleLocalNotificationAsync( - localNotification: LocalNotification, - schedulingOptions: { time: Date | number, repeat?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year' } - ): Promise; - function dismissNotificationAsync(localNotificationId: LocalNotificationId): Promise; - function dismissAllNotificationsAsync(): Promise; - function cancelScheduledNotificationAsync(localNotificationId: LocalNotificationId): Promise; - function cancelAllScheduledNotificationsAsync(): Promise; - function getBadgeNumberAsync(): Promise; - function setBadgeNumberAsync(number: number): Promise; - } - - /** - * Pedometer - */ - export namespace Pedometer { - function isAvailableAsync(): Promise; - function getStepCountAsync(start: Date, end: Date): Promise<{ steps: number; }>; - function watchStepCount(callback: (params: { steps: number; }) => void): EventSubscription; - } - - /** - * Permissions - */ - export namespace Permissions { - type PermissionType = 'remoteNotifications' | 'location' | - 'camera' | 'contacts' | 'audioRecording'; - type PermissionStatus = 'undetermined' | 'granted' | 'denied'; - type PermissionExpires = 'never'; - interface PermissionDetailsLocationIOS { - scope: 'whenInUse' | 'always'; - } - interface PermissionDetailsLocationAndroid { - scope: 'fine' | 'coarse' | 'none'; - } - interface PermissionResponse { - status: PermissionStatus; - expires: PermissionExpires; - ios?: PermissionDetailsLocationIOS; - android?: PermissionDetailsLocationAndroid; - } - - function getAsync(type: PermissionType): Promise; - function askAsync(type: PermissionType): Promise; - - const CAMERA: string; - const CAMERA_ROLL: string; - const AUDIO_RECORDING: string; - const LOCATION: string; - const REMOTE_NOTIFICATIONS: string; - const NOTIFICATIONS: string; - const CONTACTS: string; - } - - /** - * Register Root Component - */ - export function registerRootComponent(component: Component): Component; - - /** - * ScreenOrientation - */ - export namespace ScreenOrientation { - interface Orientation { - ALL: 'ALL'; - ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN'; - PORTRAIT: 'PORTRAIT'; - PORTRAIT_UP: 'PORTRAIT_UP'; - PORTRAIT_DOWN: 'PORTRAIT_DOWN'; - LANDSCAPE: 'LANDSCAPE'; - LANDSCAPE_LEFT: 'LANDSCAPE_LEFT'; - LANDSCAPE_RIGHT: 'LANDSCAPE_RIGHT'; - } - const Orientation: Orientation; - function allow(orientation: string): void; - } - - /** - * SecureStore - */ - export namespace SecureStore { - interface SecureStoreOptions { - keychainService?: string; - keychainAccessible?: number; - } - function setItemAsync(key: string, value: string, options?: SecureStoreOptions): Promise; - function getItemAsync(key: string, options?: SecureStoreOptions): Promise; - function deleteItemAsync(key: string, options?: SecureStoreOptions): Promise; - } - - /** - * Segment - */ - export namespace Segment { - function initialize(keys: { - androidWriteKey: string; - iosWriteKey: string; - }): void; - function identify(userId: string): void; - function identifyWithTraits(userId: string, traits: object): void; - function track(event: string): void; - function reset(): void; - function trackWithProperties(event: string, properties: object): void; - function screen(screenName: string): void; - function screenWithProperties(screenName: string, properties: object): void; - function flush(): void; - } - - /** - * Speech - */ - export namespace Speech { - interface SpeechOptions { - language?: string; - pitch?: number; - rate?: number; - onStart?: () => void; - onStopped?: () => void; - onDone?: () => void; - onError?: (error: string) => void; - } - - function speak(text: string, options?: SpeechOptions): void; - function stop(): void; - function isSpeakingAsync(): Promise; - } - - /** - * SQLite - */ - export namespace SQLite { - type Error = any; - - interface Database { - transaction( - callback: (transaction: Transaction) => any, - error?: (error: Error) => any, // TODO def of error - success?: () => any - ): void; - } - - interface Transaction { - executeSql( - sqlStatement: string, - arguments?: string[] | number[], - success?: (transaction: Transaction, resultSet: ResultSet) => any, - error?: (transaction: Transaction, error: Error) => any - ): void; - } - - interface ResultSet { - insertId: number; - rowAffected: number; - rows: { - length: number; - item: (index: number) => any; - _array: HashMap[]; - }; - } - - function openDatabase( - name: string | { - name: string, - version?: string, - description?: string, - size?: number, - callback?: () => any - }, + function openDatabase( + name: string | { + name: string, version?: string, description?: string, size?: number, callback?: () => any - ): any; + }, + version?: string, + description?: string, + size?: number, + callback?: () => any + ): any; +} + +// #region Svg +/** + * Svg + */ +export interface SvgCommonProps { + fill?: string; + fillOpacity?: number | string; + stroke?: string; + strokeWidth?: number | string; + strokeOpacity?: number | string; + strokeLinecap?: string; + strokeLineJoin?: string; + strokeDasharray?: any[]; + strokeDashoffset?: any; + x?: number | string; + y?: number | string; + rotate?: number | string; + scale?: number | string; + origin?: number | string; + originX?: number | string; + originY?: number | string; + id?: string; + disabled?: boolean; + onPress?: () => any; + onPressIn?: () => any; + onPressOut?: () => any; + onLongPress?: () => any; + delayPressIn?: number; + delayPressOut?: number; + delayLongPress?: number; +} + +export interface SvgRectProps extends SvgCommonProps { + width: number | string; + height: number | string; +} + +export interface SvgCircleProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + r: number | string; +} + +export interface SvgEllipseProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + rx: number | string; + ry: number | string; +} + +export interface SvgLineProps extends SvgCommonProps { + x1: number | string; + y1: number | string; + x2: number | string; + y2: number | string; +} + +export interface SvgPolyProps extends SvgCommonProps { + points: string; +} + +export interface SvgPathProps extends SvgCommonProps { + d: string; +} + +export interface SvgTextProps extends SvgCommonProps { + textAnchor?: string; + fontSize?: number | string; + fontWeight?: string; +} + +export interface SvgTSpanProps extends SvgTextProps { + dx?: string; + dy?: string; +} + +export interface SvgTextPathProps extends SvgCommonProps { + href?: string; + startOffset?: string; +} + +export interface SvgUseProps extends SvgCommonProps { + href: string; + x: number | string; + y: number | string; +} + +export interface SvgSymbolProps extends SvgCommonProps { + viewBox: string; + width: number | string; + height: number | string; +} + +export interface SvgLinearGradientProps extends SvgCommonProps { + x1: number | string; + x2: number | string; + y1: number | string; + y2: number | string; +} + +export interface SvgRadialGradientProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + rx: number | string; + ry: number | string; + fx: number | string; + fy: number | string; + gradientUnits?: string; +} + +export interface SvgStopProps extends SvgCommonProps { + offset?: string; + stopColor?: string; + stopOpacity?: string; +} + +export class Svg extends Component<{ width: number, height: number }> { + static Circle: ComponentClass; + static ClipPath: ComponentClass; + static Defs: ComponentClass; + static Ellipse: ComponentClass; + static G: ComponentClass; + static Line: ComponentClass; + static LinearGradient: ComponentClass; + static Path: ComponentClass; + static Polygon: ComponentClass; + static Polyline: ComponentClass; + static RadialGradient: ComponentClass; + static Rect: ComponentClass; + static Stop: ComponentClass; + static Symbol: ComponentClass; + static Text: ComponentClass; + static TextPath: ComponentClass; + static TSpan: ComponentClass; + static Use: ComponentClass; +} +// #endregion + +/** + * Take Snapshot + */ +export function takeSnapshotAsync( + view?: (number | React.ReactElement), + options?: { + width?: number, + height?: number, + format?: 'png' | 'jpg' | 'jpeg' | 'webm', + quality?: number, + result?: 'file' | 'base64' | 'data-uri', } +): Promise; - // #region Svg - /** - * Svg - */ - export interface SvgCommonProps { - fill?: string; - fillOpacity?: number | string; - stroke?: string; - strokeWidth?: number | string; - strokeOpacity?: number | string; - strokeLinecap?: string; - strokeLineJoin?: string; - strokeDasharray?: any[]; - strokeDashoffset?: any; - x?: number | string; - y?: number | string; - rotate?: number | string; - scale?: number | string; - origin?: number | string; - originX?: number | string; - originY?: number | string; - id?: string; - disabled?: boolean; - onPress?: () => any; - onPressIn?: () => any; - onPressOut?: () => any; - onLongPress?: () => any; - delayPressIn?: number; - delayPressOut?: number; - delayLongPress?: number; - } +/** Helpful utility functions that don’t fit anywhere else, including some localization and internationalization methods. */ +export namespace Util { + /** Returns the current device country code. */ + function getCurrentDeviceCountryAsync(): Promise; - export interface SvgRectProps extends SvgCommonProps { - width: number | string; - height: number | string; - } + /** Returns the current device locale as a string. */ + function getCurrentLocaleAsync(): Promise; - export interface SvgCircleProps extends SvgCommonProps { - cx: number | string; - cy: number | string; - r: number | string; - } + /** Returns the current device time zone name. */ + function getCurrentTimeZoneAsync(): Promise; - export interface SvgEllipseProps extends SvgCommonProps { - cx: number | string; - cy: number | string; - rx: number | string; - ry: number | string; - } + /** Reloads the current experience. This will fetch and load the newest available JavaScript supported by the device’s Expo environment. This is useful for triggering an update of your experience if you have published a new version. */ + function reload(): void; - export interface SvgLineProps extends SvgCommonProps { - x1: number | string; - y1: number | string; - x2: number | string; - y2: number | string; - } + /** _Android only_. Invokes a callback when a new version of your app is successfully downloaded in the background. */ + function addNewVersionListenerExperimental(listener: (event: { + manifest: object; + }) => void): { remove(): void; }; +} - export interface SvgPolyProps extends SvgCommonProps { - points: string; - } +// #region Video +/** + * Expo Video + */ +export interface NaturalSize { + width: number; + height: number; + orientation: Orientation; +} - export interface SvgPathProps extends SvgCommonProps { - d: string; - } +export interface ReadyForDisplayEvent { + naturalSize: NaturalSize; + status: PlaybackStatus; +} - export interface SvgTextProps extends SvgCommonProps { - textAnchor?: string; - fontSize?: number | string; - fontWeight?: string; - } +export enum FullscreenUpdateVariants { + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 +} - export interface SvgTSpanProps extends SvgTextProps { - dx?: string; - dy?: string; - } +export interface FullscreenUpdateEvent { + fullscreenUpdate: FullscreenUpdateVariants; + status: PlaybackStatus; +} - export interface SvgTextPathProps extends SvgCommonProps { - href?: string; - startOffset?: string; - } +export interface VideoProps { + source?: PlaybackSource | null; + posterSource?: URISource | RequireSource; - export interface SvgUseProps extends SvgCommonProps { - href: string; - x: number | string; - y: number | string; - } + resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; + useNativeControls?: boolean; + usePoster?: boolean; - export interface SvgSymbolProps extends SvgCommonProps { - viewBox: string; - width: number | string; - height: number | string; - } + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; + onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; + onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; - export interface SvgLinearGradientProps extends SvgCommonProps { - x1: number | string; - x2: number | string; - y1: number | string; - y2: number | string; - } + onLoadStart?: () => void; + onLoad?: (status: PlaybackStatus) => void; + onError?: (error: string) => void; - export interface SvgRadialGradientProps extends SvgCommonProps { - cx: number | string; - cy: number | string; - rx: number | string; - ry: number | string; - fx: number | string; - fy: number | string; - gradientUnits?: string; - } + status?: PlaybackStatusToSet; + progressUpdateIntervalMillis?: number; + positionMillis?: number; + shouldPlay?: boolean; + rate?: number; + shouldCorrectPitch?: boolean; + volume?: number; + isMuted?: boolean; + isLooping?: boolean; - export interface SvgStopProps extends SvgCommonProps { - offset?: string; - stopColor?: string; - stopOpacity?: string; - } + scaleX?: number; + scaleY?: number; + translateX?: number; + translateY?: number; + rotation?: number; + ref?: Ref; +} - export class Svg extends Component<{ width: number, height: number }> { - static Circle: ComponentClass; - static ClipPath: ComponentClass; - static Defs: ComponentClass; - static Ellipse: ComponentClass; - static G: ComponentClass; - static Line: ComponentClass; - static LinearGradient: ComponentClass; - static Path: ComponentClass; - static Polygon: ComponentClass; - static Polyline: ComponentClass; - static RadialGradient: ComponentClass; - static Rect: ComponentClass; - static Stop: ComponentClass; - static Symbol: ComponentClass; - static Text: ComponentClass; - static TextPath: ComponentClass; - static TSpan: ComponentClass; - static Use: ComponentClass; - } - // #endregion +export interface VideoState { + showPoster: boolean; +} - /** - * Take Snapshot - */ - export function takeSnapshotAsync( - view?: (number | React.ReactElement), - options?: { - width?: number, - height?: number, - format?: 'png' | 'jpg' | 'jpeg' | 'webm', - quality?: number, - result?: 'file' | 'base64' | 'data-uri', - } - ): Promise; +export class Video extends Component { + static RESIZE_MODE_CONTAIN: ResizeModeContain; + static RESIZE_MODE_COVER: ResizeModeCover; + static RESIZE_MODE_STRETCH: ResizeModeStretch; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; +} +// #endregion - /** Helpful utility functions that don’t fit anywhere else, including some localization and internationalization methods. */ - export namespace Util { - /** Returns the current device country code. */ - function getCurrentDeviceCountryAsync(): Promise; - - /** Returns the current device locale as a string. */ - function getCurrentLocaleAsync(): Promise; - - /** Returns the current device time zone name. */ - function getCurrentTimeZoneAsync(): Promise; - - /** Reloads the current experience. This will fetch and load the newest available JavaScript supported by the device’s Expo environment. This is useful for triggering an update of your experience if you have published a new version. */ - function reload(): void; - - /** _Android only_. Invokes a callback when a new version of your app is successfully downloaded in the background. */ - function addNewVersionListenerExperimental(listener: (event: { - manifest: object; - }) => void): { remove(): void; }; - } - - // #region Video - /** - * Expo Video - */ - export interface NaturalSize { - width: number; - height: number; - orientation: Orientation; - } - - export interface ReadyForDisplayEvent { - naturalSize: NaturalSize; - status: PlaybackStatus; - } - - export enum FullscreenUpdateVariants { - IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, - IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, - IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, - IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 - } - - export interface FullscreenUpdateEvent { - fullscreenUpdate: FullscreenUpdateVariants; - status: PlaybackStatus; - } - - export interface VideoProps { - source?: PlaybackSource | null; - posterSource?: URISource | RequireSource; - - resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; - useNativeControls?: boolean; - usePoster?: boolean; - - onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; - onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; - onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; - - onLoadStart?: () => void; - onLoad?: (status: PlaybackStatus) => void; - onError?: (error: string) => void; - - status?: PlaybackStatusToSet; - progressUpdateIntervalMillis?: number; - positionMillis?: number; - shouldPlay?: boolean; - rate?: number; - shouldCorrectPitch?: boolean; - volume?: number; - isMuted?: boolean; - isLooping?: boolean; - - scaleX?: number; - scaleY?: number; - translateX?: number; - translateY?: number; - rotation?: number; - ref?: Ref; - } - - export interface VideoState { - showPoster: boolean; - } - - export class Video extends Component { - static RESIZE_MODE_CONTAIN: ResizeModeContain; - static RESIZE_MODE_COVER: ResizeModeCover; - static RESIZE_MODE_STRETCH: ResizeModeStretch; - static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; - static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; - static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; - static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; - } - // #endregion - - /** - * Web Browser - */ - export namespace WebBrowser { - function openBrowserAsync(url: string): Promise<{ type: 'cancelled' | 'dismissed' }>; - function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; - function dismissBrowser(): Promise<{ type: 'dismissed' }>; - } +/** + * Web Browser + */ +export namespace WebBrowser { + function openBrowserAsync(url: string): Promise<{ type: 'cancelled' | 'dismissed' }>; + function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; + function dismissBrowser(): Promise<{ type: 'dismissed' }>; +} From c4a393bec4af75c13464598cf9fbcece7ed95848 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:23:35 +0100 Subject: [PATCH 13/52] Move Amplitude to alphabetical position --- types/expo/index.d.ts | 78 +++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 4ae37691a4..6e63c911e8 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -55,6 +55,45 @@ export namespace Accelerometer { function setUpdateInterval(intervalMs: number): void; } +/** + * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. + * + * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. + */ +export namespace Amplitude { + /** Initializes Amplitude with your Amplitude API key. */ + function initialize(apiKey: string): void; + + /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ + function setUserId(userId: string): void; + + /** Set properties for the current user. */ + function setUserProperties(userProperties: HashMap): void; + + /** Clear properties set by `setUserProperties()`. */ + function clearUserProperties(): void; + + /** Log an event to Amplitude. */ + function logEvent(eventName: string): void; + + /** Log an event to Amplitude with custom properties. */ + function logEventWithProperties( + eventName: string, + + /** A map of custom properties. */ + properties: HashMap + ): void; + + /** Add the current user to a group. */ + function setGroup( + /** The group name, e.g. `'sports'`. */ + groupType: string, + + /** An array of group names, e.g. `['tennis', 'soccer']`. */ + groupNames: string[] + ): void; +} + /** * Provides basic sample playback and recording. * @@ -300,45 +339,6 @@ export namespace Audio { } } -/** - * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. - * - * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. - */ -export namespace Amplitude { - /** Initializes Amplitude with your Amplitude API key. */ - function initialize(apiKey: string): void; - - /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ - function setUserId(userId: string): void; - - /** Set properties for the current user. */ - function setUserProperties(userProperties: HashMap): void; - - /** Clear properties set by `setUserProperties()`. */ - function clearUserProperties(): void; - - /** Log an event to Amplitude. */ - function logEvent(eventName: string): void; - - /** Log an event to Amplitude with custom properties. */ - function logEventWithProperties( - eventName: string, - - /** A map of custom properties. */ - properties: HashMap - ): void; - - /** Add the current user to a group. */ - function setGroup( - /** The group name, e.g. `'sports'`. */ - groupType: string, - - /** An array of group names, e.g. `['tennis', 'soccer']`. */ - groupNames: string[] - ): void; -} - /** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ export class Asset { constructor({ name, type, hash, uri, width, height }: { From f62103f2abdda061f4a91c414f50652a1e505e63 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:24:11 +0100 Subject: [PATCH 14/52] Move AppLoading to alphabetical position --- types/expo/index.d.ts | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 6e63c911e8..eac529b384 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -94,6 +94,31 @@ export namespace Amplitude { ): void; } +// #region AppLoading +/** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ +export type AppLoadingProps = { + /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ + startAsync: () => Promise; + + /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ + onFinish: () => void; + + /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ + onError?: (error: Error) => void; +} | { + startAsync: null; + onFinish: null; + onError?: null; + }; + +/** + * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. + * + * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. + */ +export class AppLoading extends Component { } +// #endregion AppLoading + /** * Provides basic sample playback and recording. * @@ -592,31 +617,6 @@ export class PlaybackObject { } // #endregion -// #region AppLoading -/** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ -export type AppLoadingProps = { - /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ - startAsync: () => Promise; - - /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ - onFinish: () => void; - - /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ - onError?: (error: Error) => void; -} | { - startAsync: null; - onFinish: null; - onError?: null; - }; - -/** - * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. - * - * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. - */ -export class AppLoading extends Component { } -// #endregion AppLoading - // #region BarCodeScanner /** * BarCodeScanner From be1017ac304f6340c5c1dc0b23106c618591802c Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:24:48 +0100 Subject: [PATCH 15/52] Move Asset to alphabetical position --- types/expo/index.d.ts | 98 +++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index eac529b384..f0e316862d 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -119,6 +119,55 @@ export type AppLoadingProps = { export class AppLoading extends Component { } // #endregion AppLoading +/** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ +export class Asset { + constructor({ name, type, hash, uri, width, height }: { + name: string; + type: string; + hash: string; + uri: string; + width?: number; + height?: number; + }); + + /** The MD5 hash of the asset’s data. */ + hash: Md5; + + /** The name of the asset file without the extension. Also without the part from @ onward in the filename (used to specify scale factor for images). */ + name: string; + + /** The extension of the asset filename. */ + type: string; + + /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ + uri: string; + + /** If the asset has been downloaded (by calling `downloadAsync()`), the `file://` URI pointing to the local file on the device that contains the asset data. */ + localUri: string; + + /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ + width?: number; + + /** If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ + height?: number; + + downloading: boolean; + downloaded: boolean; + downloadCallbacks: Array<{ resolve: () => any, reject: (e?: any) => any }>; + + /** Downloads the asset data to a local file in the device’s cache directory. Once the returned promise is fulfilled without error, the localUri field of this asset points to a local file containing the asset data. The asset is only downloaded if an up-to-date local file for the asset isn’t already present due to an earlier download. */ + downloadAsync(): Promise; + + /** Returns the `Expo.Asset` instance representing an asset given its module. */ + static fromModule(module: RequireSource): Asset; + + /** + * A helper that wraps `Expo.Asset.fromModule(module).downloadAsync` for convenience. + * @param moduleIds An array of `require('path/to/file')`. Can also be just one module without an Array. + */ + static loadAsync(module: RequireSource[] | RequireSource): Promise; +} + /** * Provides basic sample playback and recording. * @@ -364,55 +413,6 @@ export namespace Audio { } } -/** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ -export class Asset { - constructor({ name, type, hash, uri, width, height }: { - name: string; - type: string; - hash: string; - uri: string; - width?: number; - height?: number; - }); - - /** The MD5 hash of the asset’s data. */ - hash: Md5; - - /** The name of the asset file without the extension. Also without the part from @ onward in the filename (used to specify scale factor for images). */ - name: string; - - /** The extension of the asset filename. */ - type: string; - - /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ - uri: string; - - /** If the asset has been downloaded (by calling `downloadAsync()`), the `file://` URI pointing to the local file on the device that contains the asset data. */ - localUri: string; - - /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ - width?: number; - - /** If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ - height?: number; - - downloading: boolean; - downloaded: boolean; - downloadCallbacks: Array<{ resolve: () => any, reject: (e?: any) => any }>; - - /** Downloads the asset data to a local file in the device’s cache directory. Once the returned promise is fulfilled without error, the localUri field of this asset points to a local file containing the asset data. The asset is only downloaded if an up-to-date local file for the asset isn’t already present due to an earlier download. */ - downloadAsync(): Promise; - - /** Returns the `Expo.Asset` instance representing an asset given its module. */ - static fromModule(module: RequireSource): Asset; - - /** - * A helper that wraps `Expo.Asset.fromModule(module).downloadAsync` for convenience. - * @param moduleIds An array of `require('path/to/file')`. Can also be just one module without an Array. - */ - static loadAsync(module: RequireSource[] | RequireSource): Promise; -} - /** * AuthSession */ From b24bc6a6e6042f3fa34cf1f6be9a80b022e17f06 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:26:15 +0100 Subject: [PATCH 16/52] Align brackets --- types/expo/index.d.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index f0e316862d..6c3f8cc3bb 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -417,9 +417,10 @@ export namespace Audio { * AuthSession */ export namespace AuthSession { - function startAsync(options: { authUrl: string; returnUrl?: string; }): Promise<{ - type: 'cancel'; - } | { + function startAsync(options: { authUrl: string; returnUrl?: string; }): Promise< + { + type: 'cancel'; + } | { type: 'dismissed'; } | { type: 'success'; @@ -439,13 +440,14 @@ export namespace AuthSession { /** * AV */ -export type PlaybackStatus = { - isLoaded: false; - androidImplementation?: string; +export type PlaybackStatus = + { + isLoaded: false; + androidImplementation?: string; - /** Populated exactly once when an error forces the object to unload. */ - error?: string; -} | { + /** Populated exactly once when an error forces the object to unload. */ + error?: string; + } | { isLoaded: true; androidImplementation?: string; uri: string; From 79220e6f3d0a6e04af392af4f233037ab98d7b07 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:36:41 +0100 Subject: [PATCH 17/52] Use declare instead of export --- types/expo/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 6c3f8cc3bb..752018df70 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -31,7 +31,7 @@ type URISource = ImageURISource; interface HashMap { [key: string]: any; } /** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ -export namespace Accelerometer { +declare namespace Accelerometer { interface AccelerometerObject { x: Axis; y: Axis; From a36d4ccc2ea02cb8fd336db43fe5d879368d9d53 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:48:17 +0100 Subject: [PATCH 18/52] Update Audio, AV and Video --- types/expo/index.d.ts | 926 +++++++++++++++++++++++++++--------------- 1 file changed, 590 insertions(+), 336 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 752018df70..64523b7dae 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -174,6 +174,110 @@ export class Asset { * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. */ export namespace Audio { + type PlaybackSource = AV.PlaybackSource; + type PlaybackStatus = AV.PlaybackStatus; + type PlaybackStatusToSet = AV.PlaybackStatusToSet; + + type RecordingOptions = { + android: { + extension: string, + outputFormat: number, + audioEncoder: number, + sampleRate?: number, + numberOfChannels?: number, + bitRate?: number, + maxFileSize?: number + }, + ios: { + extension: string, + outputFormat?: string | number, + audioQuality: number, + sampleRate: number, + numberOfChannels: number, + bitRate: number, + bitRateStrategy?: number, + bitDepthHint?: number, + linearPCMBitDepth?: number, + linearPCMIsBigEndian?: boolean, + linearPCMIsFloat?: boolean + } + }; + + enum RecordingOptionsAndroidOutputFormat { + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT = 0, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP = 1, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4 = 2, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB = 3, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB = 4, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF = 5, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS = 6, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP = 7, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS = 8, + RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM = 9 + } + + enum RecordingOptionAndroidAudioEncoder { + RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT = 0, + RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB = 1, + RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB = 2, + RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC = 3, + RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC = 4, + RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD = 5, + RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS = 6 + } + + enum RecordingOptionIosOutputFormat { + RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM = 'lpcm', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3 = 'ac-3', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3 = 'cac3', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4 = 'ima4', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC = 'aac ', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP = 'celp', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC = 'hvxc', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ = 'twvq', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3 = 'MAC3', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6 = 'MAC6', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW = 'ulaw', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW = 'alaw', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN = 'QDMC', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2 = 'QDM2', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM = 'Qclp', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1 = '.mp1', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2 = '.mp2', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3 = '.mp3', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS = 'alac', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE = 'aach', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD = 'aacl', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD = 'aace', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR = 'aacf', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2 = 'aacg', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2 = 'aacp', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL = 'aacs', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR = 'samr', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB = 'sawb', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE = 'AUDB', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC = 'ilbc', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA = 0x6d730011, + RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM = 0x6d730031, + RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3 = 'aes3', + RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3 = 'ec-3' + } + + enum RecordingOptionIosAudioQuality { + RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN = 0, + RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW = 0x20, + RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM = 0x40, + RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH = 0x60, + RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX = 0x7f + } + + enum RecodingOptionIosBitRateStratety { + RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT = 0, + RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE = 1, + RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED = 2, + RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE = 3 + } + enum InterruptionModeIos { /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, @@ -185,10 +289,6 @@ export namespace Audio { INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 } - const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; - const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; - const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; - enum InterruptionModeAndroid { /** If this option is set, your experience’s audio interrupts audio from other apps. */ INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, @@ -197,78 +297,14 @@ export namespace Audio { INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 } - const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; - const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; + const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; + const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; - const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; - - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; - const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; - - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; - const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; - - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; - const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; - - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; - const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; - - type RecordingStatus = { - canRecord: false, - isDoneRecording: false - } | { + type RecordingStatus = + { + canRecord: false, + isDoneRecording: false + } | { canRecord: true, isRecording: boolean, durationMillis: number @@ -278,58 +314,40 @@ export namespace Audio { durationMillis: number }; - const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; - const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; - - interface RecordingOptions { - android: { - extension: string; - outputFormat: number; - audioEncoder: number; - sampleRate?: number; - numberOfChannels?: number; - bitRate?: number; - maxFileSize?: number; - }; - ios: { - extension: string; - outputFormat?: string | number; - audioQuality: number; - sampleRate: number; - numberOfChannels: number; - bitRate: number; - bitRateStrategy?: number; - bitDepthHint?: number; - linearPCMBitDepth?: number; - linearPCMIsBigEndian?: boolean; - linearPCMIsFloat?: boolean; - }; - } - + /** + * Note that these are the only legal `AudioMode` combinations of (`playsInSilentModeIOS`, `allowsRecordingIOS`, `interruptionModeIOS`), and any other will result in promise rejection: + * + * - `false`, `false`, `INTERRUPTION_MODE_IOS_DO_NOT_MIX` + * - `false`, `false`, `INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS` + * - `true`, `true`, `INTERRUPTION_MODE_IOS_DO_NOT_MIX` + * - `true`, `true`, `INTERRUPTION_MODE_IOS_DUCK_OTHERS` + * - `true`, `true`, `INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS` + * - `true`, `false`, `INTERRUPTION_MODE_IOS_DO_NOT_MIX` + * - `true`, `false`, `INTERRUPTION_MODE_IOS_DUCK_OTHERS` + * - `true`, `false`, `INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS` + */ interface AudioMode { - /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ - playsInSilentModeIOS: boolean; - /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ allowsRecordingIOS: boolean; /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ interruptionModeIOS: InterruptionModeIos; - /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ - shouldDuckAndroid: boolean; + /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ + playsInSilentLockedModeIOS: boolean; /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ interruptionModeAndroid: InterruptionModeAndroid; + + /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ + shouldDuckAndroid: boolean; } function setIsEnabledAsync(value: boolean): Promise; function setAudioModeAsync(mode: AudioMode): Promise; /** This class represents a sound corresponding to an Asset or URL. */ - class Sound extends PlaybackObject { - constructor(); - + class Sound { /** * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. * @@ -351,16 +369,150 @@ export namespace Audio { initialStatus?: PlaybackStatusToSet, /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ - onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, + onPlaybackStatusUpdate?: ((status?: PlaybackStatus) => void) | null, /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ downloadFirst?: boolean - ): Promise<{ sound: Sound, status: PlaybackStatus }>; + ): Promise<{ sound: Sound, status: PlaybackStatus }> + + // Methods below are shared with the Video class. The code is duplicated here in expo.d.ts because I couldn't figure a way to share it. + + /** + * Gets the `PlaybackStatus` of the `playbackObject`. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. + */ + getStatusAsync(): Promise; + + /** + * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. + */ + loadAsync( + /** + * The source of the media. The following forms are supported: + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. + * - `require('path/to/file')` for a media file asset in the source code directory. + * - An `Expo.Asset object` for a media file asset. + */ + source: PlaybackSource, + + /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ + initialStatus?: PlaybackStatusToSet, + + /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ + downloadFirst?: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ + pauseAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. + */ + playAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. + */ + playFromPositionAsync( + /** The desired position of playback in milliseconds. */ + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** + * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. + */ + replayAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ + setIsLoopingAsync( + /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ + isLooping: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ + setIsMutedAsync( + /** A boolean describing if the audio of this media should be muted. */ + isMuted: boolean + ): Promise; + + /** + * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. + * + * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. + */ + setOnPlaybackStatusUpdate( + /** A function taking a single parameter `PlaybackStatus`. */ + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void + ): void; + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ + setPositionAsync( + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ + setProgressUpdateIntervalAsync( + /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ + progressUpdateIntervalMillis: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ + setRateAsync( + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate: number, + + /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ + shouldCorrectPitch: boolean + ): Promise; + + /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ + setStatusAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ + setVolumeAsync( + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ + stopAsync(): Promise; + + /** + * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. + */ + unloadAsync(): Promise; } class Recording { - constructor(); - /** Gets the `status` of the `Recording`. */ getStatusAsync(): Promise; @@ -436,189 +588,54 @@ export namespace AuthSession { function getRedirectUrl(): string; } -// #region AV -/** - * AV - */ -export type PlaybackStatus = - { - isLoaded: false; - androidImplementation?: string; +declare namespace AV { + type PlaybackSource = number | { uri: string } | Asset; - /** Populated exactly once when an error forces the object to unload. */ - error?: string; - } | { - isLoaded: true; - androidImplementation?: string; - uri: string; - progressUpdateIntervalMillis: number; - durationMillis?: number; - positionMillis: number; - playableDurationMillis?: number; - shouldPlay: boolean; - isPlaying: boolean; - isBuffering: boolean; - rate: number; - shouldCorrectPitch: boolean; - volume: number; - isMuted: boolean; - isLooping: boolean; + type PlaybackStatus = + { + isLoaded: false, + androidImplementation?: string, - /** True exactly once when the track plays to finish. */ - didJustFinish: boolean; + /** Populated exactly once when an error forces the object to unload. */ + error?: string + } | { + isLoaded: true, + androidImplementation?: string, + + uri: string, + + progressUpdateIntervalMillis: number, + durationMillis?: number, + positionMillis: number, + playableDurationMillis?: number, + + shouldPlay: boolean, + isPlaying: boolean, + isBuffering: boolean, + + rate: number, + shouldCorrectPitch: boolean, + volume: number, + isMuted: boolean, + isLooping: boolean, + + /** True exactly once when the track plays to finish. */ + didJustFinish: boolean + }; + + type PlaybackStatusToSet = { + androidImplementation?: string, + progressUpdateIntervalMillis?: number, + positionMillis?: number, + shouldPlay?: boolean, + rate?: number, + shouldCorrectPitch?: boolean, + volume?: number, + isMuted?: boolean, + isLooping?: boolean }; - -export interface PlaybackStatusToSet { - androidImplementation?: string; - progressUpdateIntervalMillis?: number; - positionMillis?: number; - shouldPlay?: boolean; - rate?: FloatFromZeroToOne; - shouldCorrectPitch?: boolean; - volume?: FloatFromZeroToOne; - isMuted?: boolean; - isLooping?: boolean; } -export type PlaybackSource = RequireSource | { uri: string } | Asset; - -export class PlaybackObject { - /** - * Gets the `PlaybackStatus` of the `playbackObject`. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. - */ - getStatusAsync(): Promise; - - /** - * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. - */ - loadAsync( - /** - * The source of the media. The following forms are supported: - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. - * - `require('path/to/file')` for a media file asset in the source code directory. - * - An `Expo.Asset object` for a media file asset. - */ - source: PlaybackSource, - - /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ - initialStatus?: PlaybackStatusToSet, - - /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ - downloadFirst?: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ - pauseAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. - */ - playAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. - */ - playFromPositionAsync( - /** The desired position of playback in milliseconds. */ - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** - * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. - */ - replayAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ - setIsLoopingAsync( - /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ - isLooping: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ - setIsMutedAsync( - /** A boolean describing if the audio of this media should be muted. */ - isMuted: boolean - ): Promise; - - /** - * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. - * - * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. - */ - setOnPlaybackStatusUpdate( - /** A function taking a single parameter `PlaybackStatus`. */ - onPlaybackStatusUpdate?: (status: PlaybackStatus) => void - ): void; - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ - setPositionAsync( - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ - setProgressUpdateIntervalAsync( - /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ - progressUpdateIntervalMillis: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ - setRateAsync( - /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ - rate: number, - - /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ - shouldCorrectPitch: boolean - ): Promise; - - /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ - setStatusAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ - setVolumeAsync( - /** A number between `0.0` (silence) and `1.0` (maximum volume). */ - volume: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ - stopAsync(): Promise; - - /** - * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. - */ - unloadAsync(): Promise; -} -// #endregion - // #region BarCodeScanner /** * BarCodeScanner @@ -1964,81 +1981,318 @@ export namespace Util { }) => void): { remove(): void; }; } -// #region Video -/** - * Expo Video - */ -export interface NaturalSize { - width: number; - height: number; - orientation: Orientation; +declare namespace Video { + type PlaybackSource = AV.PlaybackSource; + type PlaybackStatus = AV.PlaybackStatus; + type PlaybackStatusToSet = AV.PlaybackStatusToSet; + + type FullscreenUpdateEvent = { + fullscreenUpdate: 0 | 1 | 2 | 3, + status: AV.PlaybackStatus + }; + + type NaturalSize = { + width: number, + height: number, + orientation: 'portrait' | 'landscape' + }; + + type ReadyForDisplayEvent = { + naturalSize: NaturalSize, + status: AV.PlaybackStatus + }; + + type ResizeMode = 'contain' | 'cover' | 'stretch'; } -export interface ReadyForDisplayEvent { - naturalSize: NaturalSize; - status: PlaybackStatus; +interface VideoLoad { + duration: number; + currentTime: number; + canPlayReverse: boolean; + canPlayFastForward: boolean; + canPlaySlowForward: boolean; + canPlaySlowReverse: boolean; + canStepBackward: boolean; + canStepForward: boolean; + naturalSize: Video.NaturalSize; } -export enum FullscreenUpdateVariants { - IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, - IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, - IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, - IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 +type VideoError = + { + code: any, + domain: any + } | { + what: any, + extra: any + }; + +interface VideoProgress { + currentTime: number; + playableDuration: number; } -export interface FullscreenUpdateEvent { - fullscreenUpdate: FullscreenUpdateVariants; - status: PlaybackStatus; +interface VideoSeek { + currentTime: number; + seekTime: number; } -export interface VideoProps { - source?: PlaybackSource | null; - posterSource?: URISource | RequireSource; +/** See the AV documentation for more information. https://docs.expo.io/versions/latest/sdk/av.html */ +interface VideoProps { + // Source stuff + /** + * The source of the video data to display. If this prop is null, or left blank, the video component will display nothing. + * + * Note that this can also be set on the ref via loadAsync(); see below or the AV documentation for further information. + * + * The following forms for the source are supported: + * + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a video file on the web. + * - `require('path/to/file')` for a video file asset in the source code directory. + * - An `Expo.Asset` object for a video file asset. + */ + source?: AV.PlaybackSource; - resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; - useNativeControls?: boolean; - usePoster?: boolean; + /** + * The source of an optional image to display over the video while it is loading. The following forms are supported: + * + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a image file on the web. + * - `require('path/to/file')` for an image file asset in the source code directory. + */ + posterSource?: { uri: string } | number; - onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; - onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; - onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; + // Callbacks + /** A function to be called regularly with the PlaybackStatus of the video. You will likely be using this a lot. */ + onPlaybackStatusUpdate?: (status: AV.PlaybackStatus) => void; + /** A function to be called when the video begins to be loaded into memory. Called without any arguments. */ onLoadStart?: () => void; - onLoad?: (status: PlaybackStatus) => void; + + /** A function to be called once the video has been loaded. The data is streamed so all of it may not have been fetched yet, just enough to render the first frame. The function is called with the `PlaybackStatus` of the video as its parameter. */ + onLoad?: (status: AV.PlaybackStatus) => void; + + /** A function to be called if load or playback have encountered a fatal error. The function is passed a single error message string as a parameter. Errors sent here are also set on `playbackStatus.error` that are passed into the `onPlaybackStatusUpdate` callback. */ onError?: (error: string) => void; - status?: PlaybackStatusToSet; + /** + * A function to be called when the video is ready for display. Note that this function gets called whenever the video’s natural size changes. The function is passed a dictionary with the following key-value pairs: + * + * - `naturalSize`: a dictionary with the following key-value pairs: + * - `width`: a number describing the width in pixels of the video data. + * - `height`: a number describing the height in pixels of the video data. + * - `orientation`: a string describing the natural orientation of the video data, either 'portrait' or 'landscape'. + * - `status`: the PlaybackStatus of the video; see the AV documentation for further information. + */ + onReadyForDisplay?: (event: Video.ReadyForDisplayEvent) => void; + + /** + * A function to be called when the state of the native iOS fullscreen view changes (controlled via the presentIOSFullscreenPlayer() and dismissIOSFullscreenPlayer() methods on the Video’s ref). The function is passed a dictionary with the following key-value pairs: + * + * - `fullscreenUpdate`: a number taking one of the following values: + * - `Expo.Video.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT`: describing that the fullscreen player is about to present. + * - `Expo.Video.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT`: describing that the fullscreen player just finished presenting. + * - `Expo.Video.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS`: describing that the fullscreen player is about to dismiss. + * - `Expo.Video.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS`: describing that the fullscreen player just finished dismissing. + * - `status`: the PlaybackStatus of the video; see the AV documentation for further information. + */ + onIOSFullscreenUpdate?: (event: Video.FullscreenUpdateEvent) => void; + + // UI stuff + /** A boolean which, if set to true, will display native playback controls (such as play and pause) within the Video component. If you’d prefer to use custom controls, you can write them yourself, and/or check out the Videoplayer component. https://github.com/expo/videoplayer */ + useNativeControls?: boolean; + + /** + * A string describing how the video should be scaled for display in the component view bounds. Must be one of the following values: + * + * - `Expo.Video.RESIZE_MODE_STRETCH` - Stretch to fill component bounds. + * - `Expo.Video.RESIZE_MODE_CONTAIN` - Fit within component bounds while preserving aspect ratio. + * - `Expo.Video.RESIZE_MODE_COVER` - Fill component bounds while preserving aspect ratio. + */ + resizeMode?: Video.ResizeMode + + /** A boolean which, if set to true, will display an image (whose source is set via the prop posterSource) while the video is loading. */ + usePoster?: boolean + + // Playback API + /** A dictionary setting a new `PlaybackStatusToSet` on the video. */ + status?: AV.PlaybackStatusToSet; progressUpdateIntervalMillis?: number; + + /** The desired position of playback in milliseconds. */ positionMillis?: number; + + /** A boolean describing if the media is supposed to play. Playback may not start immediately after setting this value for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. */ shouldPlay?: boolean; + + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ rate?: number; + + /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ shouldCorrectPitch?: boolean; volume?: number; + + /** A boolean describing if the audio of this media should be muted. */ isMuted?: boolean; + + /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ isLooping?: boolean; + // Required by react-native scaleX?: number; scaleY?: number; translateX?: number; translateY?: number; rotation?: number; - ref?: Ref; } -export interface VideoState { - showPoster: boolean; -} +declare class Video extends Component { + static RESIZE_MODE_CONTAIN: string; + static RESIZE_MODE_COVER: string; + static RESIZE_MODE_STRETCH: string; -export class Video extends Component { - static RESIZE_MODE_CONTAIN: ResizeModeContain; - static RESIZE_MODE_COVER: ResizeModeCover; - static RESIZE_MODE_STRETCH: ResizeModeStretch; - static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; - static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; - static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; - static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; + seek(time: string): void; + + /** (iOS only) This presents a fullscreen view of your video component on top of your app’s UI. Note that even if `useNativeControls` is set to `false`, native controls will be visible in fullscreen mode. Implementing a custom fullscreen mode is necessary if you want fullscreen on Android and/or with custom controls overlayed. */ + presentFullscreenPlayer(): Promise; + + /** (iOS only) This dismisses the fullscreen video view. */ + dismissFullscreenPlayer(): Promise; + + // Methods below are shared with the Sound class. The code is duplicated here in expo.d.ts because I couldn't figure a way to share it. + + /** + * Gets the `PlaybackStatus` of the `playbackObject`. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. + */ + getStatusAsync(): Promise; + + /** + * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. + */ + loadAsync( + /** + * The source of the media. The following forms are supported: + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. + * - `require('path/to/file')` for a media file asset in the source code directory. + * - An `Expo.Asset object` for a media file asset. + */ + source: AV.PlaybackSource, + + /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ + initialStatus?: AV.PlaybackStatusToSet, + + /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ + downloadFirst?: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ + pauseAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. + */ + playAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. + */ + playFromPositionAsync( + /** The desired position of playback in milliseconds. */ + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** + * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. + */ + replayAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: AV.PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ + setIsLoopingAsync( + /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ + isLooping: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ + setIsMutedAsync( + /** A boolean describing if the audio of this media should be muted. */ + isMuted: boolean + ): Promise; + + /** + * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. + * + * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. + */ + setOnPlaybackStatusUpdate( + /** A function taking a single parameter `PlaybackStatus`. */ + onPlaybackStatusUpdate?: (status: AV.PlaybackStatus) => void + ): void; + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ + setPositionAsync( + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ + setProgressUpdateIntervalAsync( + /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ + progressUpdateIntervalMillis: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ + setRateAsync( + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate: number, + + /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ + shouldCorrectPitch: boolean + ): Promise; + + /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ + setStatusAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: AV.PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ + setVolumeAsync( + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ + stopAsync(): Promise; + + /** + * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. + */ + unloadAsync(): Promise; } -// #endregion /** * Web Browser From f86734a632efcedabca6272f9ea1d9b3badc8f33 Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Mon, 22 Jan 2018 20:49:27 +0100 Subject: [PATCH 19/52] Add vector-icons --- types/expo/index.d.ts | 74 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 64523b7dae..35e95710bd 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -2302,3 +2302,77 @@ export namespace WebBrowser { function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; function dismissBrowser(): Promise<{ type: 'dismissed' }>; } + +declare module '@expo/vector-icons' { + import { Component } from 'react' + import { TextStyle } from 'react-native' + + interface BaseIconProps { + size?: number + color?: string + style?: TextStyle + } + + // Icon names taken from https://github.com/expo/vector-icons/tree/master/vendor/react-native-vector-icons/glyphmaps. + interface EntypoProps extends BaseIconProps { + name: '500px' | '500px-with-circle' | 'add-to-list' | 'add-user' | 'address' | 'adjust' | 'air' | 'aircraft' | 'aircraft-landing' | 'aircraft-take-off' | 'align-bottom' | 'align-horizontal-middle' | 'align-left' | 'align-right' | 'align-top' | 'align-vertical-middle' | 'app-store' | 'archive' | 'area-graph' | 'arrow-bold-down' | 'arrow-bold-left' | 'arrow-bold-right' | 'arrow-bold-up' | 'arrow-down' | 'arrow-left' | 'arrow-long-down' | 'arrow-long-left' | 'arrow-long-right' | 'arrow-long-up' | 'arrow-right' | 'arrow-up' | 'arrow-with-circle-down' | 'arrow-with-circle-left' | 'arrow-with-circle-right' | 'arrow-with-circle-up' | 'attachment' | 'awareness-ribbon' | 'back' | 'back-in-time' | 'baidu' | 'bar-graph' | 'basecamp' | 'battery' | 'beamed-note' | 'behance' | 'bell' | 'blackboard' | 'block' | 'book' | 'bookmark' | 'bookmarks' | 'bowl' | 'box' | 'briefcase' | 'browser' | 'brush' | 'bucket' | 'bug' | 'cake' | 'calculator' | 'calendar' | 'camera' | 'ccw' | 'chat' | 'check' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-small-down' | 'chevron-small-left' | 'chevron-small-right' | 'chevron-small-up' | 'chevron-thin-down' | 'chevron-thin-left' | 'chevron-thin-right' | 'chevron-thin-up' | 'chevron-up' | 'chevron-with-circle-down' | 'chevron-with-circle-left' | 'chevron-with-circle-right' | 'chevron-with-circle-up' | 'circle' | 'circle-with-cross' | 'circle-with-minus' | 'circle-with-plus' | 'circular-graph' | 'clapperboard' | 'classic-computer' | 'clipboard' | 'clock' | 'cloud' | 'code' | 'cog' | 'colours' | 'compass' | 'controller-fast-backward' | 'controller-fast-forward' | 'controller-jump-to-start' | 'controller-next' | 'controller-paus' | 'controller-play' | 'controller-record' | 'controller-stop' | 'controller-volume' | 'copy' | 'creative-cloud' | 'creative-commons' | 'creative-commons-attribution' | 'creative-commons-noderivs' | 'creative-commons-noncommercial-eu' | 'creative-commons-noncommercial-us' | 'creative-commons-public-domain' | 'creative-commons-remix' | 'creative-commons-share' | 'creative-commons-sharealike' | 'credit' | 'credit-card' | 'crop' | 'cross' | 'cup' | 'cw' | 'cycle' | 'database' | 'dial-pad' | 'direction' | 'document' | 'document-landscape' | 'documents' | 'dot-single' | 'dots-three-horizontal' | 'dots-three-vertical' | 'dots-two-horizontal' | 'dots-two-vertical' | 'download' | 'dribbble' | 'dribbble-with-circle' | 'drink' | 'drive' | 'drop' | 'dropbox' | 'edit' | 'email' | 'emoji-flirt' | 'emoji-happy' | 'emoji-neutral' | 'emoji-sad' | 'erase' | 'eraser' | 'evernote' | 'export' | 'eye' | 'eye-with-line' | 'facebook' | 'facebook-with-circle' | 'feather' | 'fingerprint' | 'flag' | 'flash' | 'flashlight' | 'flat-brush' | 'flattr' | 'flickr' | 'flickr-with-circle' | 'flow-branch' | 'flow-cascade' | 'flow-line' | 'flow-parallel' | 'flow-tree' | 'flower' | 'folder' | 'folder-images' | 'folder-music' | 'folder-video' | 'forward' | 'foursquare' | 'funnel' | 'game-controller' | 'gauge' | 'github' | 'github-with-circle' | 'globe' | 'google-' | 'google--with-circle' | 'google-drive' | 'google-hangouts' | 'google-play' | 'graduation-cap' | 'grid' | 'grooveshark' | 'hair-cross' | 'hand' | 'heart' | 'heart-outlined' | 'help' | 'help-with-circle' | 'home' | 'hour-glass' | 'houzz' | 'icloud' | 'image' | 'image-inverted' | 'images' | 'inbox' | 'infinity' | 'info' | 'info-with-circle' | 'instagram' | 'instagram-with-circle' | 'install' | 'key' | 'keyboard' | 'lab-flask' | 'landline' | 'language' | 'laptop' | 'lastfm' | 'lastfm-with-circle' | 'layers' | 'leaf' | 'level-down' | 'level-up' | 'lifebuoy' | 'light-bulb' | 'light-down' | 'light-up' | 'line-graph' | 'link' | 'linkedin' | 'linkedin-with-circle' | 'list' | 'location' | 'location-pin' | 'lock' | 'lock-open' | 'log-out' | 'login' | 'loop' | 'magnet' | 'magnifying-glass' | 'mail' | 'mail-with-circle' | 'man' | 'map' | 'mask' | 'medal' | 'medium' | 'medium-with-circle' | 'megaphone' | 'menu' | 'merge' | 'message' | 'mic' | 'minus' | 'mixi' | 'mobile' | 'modern-mic' | 'moon' | 'mouse' | 'mouse-pointer' | 'music' | 'network' | 'new' | 'new-message' | 'news' | 'newsletter' | 'note' | 'notification' | 'notifications-off' | 'old-mobile' | 'old-phone' | 'onedrive' | 'open-book' | 'palette' | 'paper-plane' | 'paypal' | 'pencil' | 'phone' | 'picasa' | 'pie-chart' | 'pin' | 'pinterest' | 'pinterest-with-circle' | 'plus' | 'popup' | 'power-plug' | 'price-ribbon' | 'price-tag' | 'print' | 'progress-empty' | 'progress-full' | 'progress-one' | 'progress-two' | 'publish' | 'qq' | 'qq-with-circle' | 'quote' | 'radio' | 'raft' | 'raft-with-circle' | 'rainbow' | 'rdio' | 'rdio-with-circle' | 'remove-user' | 'renren' | 'reply' | 'reply-all' | 'resize-100-' | 'resize-full-screen' | 'retweet' | 'rocket' | 'round-brush' | 'rss' | 'ruler' | 'save' | 'scissors' | 'scribd' | 'select-arrows' | 'share' | 'share-alternative' | 'shareable' | 'shield' | 'shop' | 'shopping-bag' | 'shopping-basket' | 'shopping-cart' | 'shuffle' | 'signal' | 'sina-weibo' | 'skype' | 'skype-with-circle' | 'slideshare' | 'smashing' | 'sound' | 'sound-mix' | 'sound-mute' | 'soundcloud' | 'sports-club' | 'spotify' | 'spotify-with-circle' | 'spreadsheet' | 'squared-cross' | 'squared-minus' | 'squared-plus' | 'star' | 'star-outlined' | 'stopwatch' | 'stumbleupon' | 'stumbleupon-with-circle' | 'suitcase' | 'swap' | 'swarm' | 'sweden' | 'switch' | 'tablet' | 'tablet-mobile-combo' | 'tag' | 'text' | 'text-document' | 'text-document-inverted' | 'thermometer' | 'thumbs-down' | 'thumbs-up' | 'thunder-cloud' | 'ticket' | 'time-slot' | 'tools' | 'traffic-cone' | 'trash' | 'tree' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'tripadvisor' | 'trophy' | 'tumblr' | 'tumblr-with-circle' | 'tv' | 'twitter' | 'twitter-with-circle' | 'typing' | 'uninstall' | 'unread' | 'untag' | 'upload' | 'upload-to-cloud' | 'user' | 'users' | 'v-card' | 'video' | 'video-camera' | 'vimeo' | 'vimeo-with-circle' | 'vine' | 'vine-with-circle' | 'vinyl' | 'vk' | 'vk-alternitive' | 'vk-with-circle' | 'voicemail' | 'wallet' | 'warning' | 'water' | 'windows-store' | 'xing' | 'xing-with-circle' | 'yelp' | 'youko' | 'youko-with-circle' | 'youtube' | 'youtube-with-circle' + } + + interface EvilIconsProps extends BaseIconProps { + name: 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'bell' | 'calendar' | 'camera' | 'cart' | 'chart' | 'check' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'clock' | 'close' | 'close-o' | 'comment' | 'credit-card' | 'envelope' | 'exclamation' | 'external-link' | 'eye' | 'gear' | 'heart' | 'image' | 'like' | 'link' | 'location' | 'lock' | 'minus' | 'navicon' | 'paperclip' | 'pencil' | 'play' | 'plus' | 'pointer' | 'question' | 'redo' | 'refresh' | 'retweet' | 'sc-facebook' | 'sc-github' | 'sc-google-plus' | 'sc-instagram' | 'sc-linkedin' | 'sc-odnoklassniki' | 'sc-pinterest' | 'sc-skype' | 'sc-soundcloud' | 'sc-telegram' | 'sc-tumblr' | 'sc-twitter' | 'sc-vimeo' | 'sc-vk' | 'sc-youtube' | 'search' | 'share-apple' | 'share-google' | 'spinner' | 'spinner-2' | 'spinner-3' | 'star' | 'tag' | 'trash' | 'trophy' | 'undo' | 'unlock' | 'user' + } + + interface FeatherProps extends BaseIconProps { + name: 'activity' | 'airplay' | 'alert-circle' | 'alert-octagon' | 'alert-triangle' | 'align-center' | 'align-justify' | 'align-left' | 'align-right' | 'anchor' | 'aperture' | 'arrow-down' | 'arrow-down-left' | 'arrow-down-right' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-left' | 'arrow-up-right' | 'at-sign' | 'award' | 'bar-chart' | 'bar-chart-2' | 'battery' | 'battery-charging' | 'bell' | 'bell-off' | 'bluetooth' | 'bold' | 'book' | 'bookmark' | 'box' | 'briefcase' | 'calendar' | 'camera' | 'camera-off' | 'cast' | 'check' | 'check-circle' | 'check-square' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-down' | 'chevrons-left' | 'chevrons-right' | 'chevrons-up' | 'chrome' | 'circle' | 'clipboard' | 'clock' | 'cloud' | 'cloud-drizzle' | 'cloud-lightning' | 'cloud-off' | 'cloud-rain' | 'cloud-snow' | 'codepen' | 'command' | 'compass' | 'copy' | 'corner-down-left' | 'corner-down-right' | 'corner-left-down' | 'corner-left-up' | 'corner-right-down' | 'corner-right-up' | 'corner-up-left' | 'corner-up-right' | 'cpu' | 'credit-card' | 'crop' | 'crosshair' | 'delete' | 'disc' | 'download' | 'download-cloud' | 'droplet' | 'edit' | 'edit-2' | 'edit-3' | 'external-link' | 'eye' | 'eye-off' | 'facebook' | 'fast-forward' | 'feather' | 'file' | 'file-minus' | 'file-plus' | 'file-text' | 'film' | 'filter' | 'flag' | 'folder' | 'github' | 'gitlab' | 'globe' | 'grid' | 'hash' | 'headphones' | 'heart' | 'help-circle' | 'home' | 'image' | 'inbox' | 'info' | 'instagram' | 'italic' | 'layers' | 'layout' | 'life-buoy' | 'link' | 'link-2' | 'list' | 'loader' | 'lock' | 'log-in' | 'log-out' | 'mail' | 'map' | 'map-pin' | 'maximize' | 'maximize-2' | 'menu' | 'message-circle' | 'message-square' | 'mic' | 'mic-off' | 'minimize' | 'minimize-2' | 'minus' | 'minus-circle' | 'minus-square' | 'monitor' | 'moon' | 'more-horizontal' | 'more-vertical' | 'move' | 'music' | 'navigation' | 'navigation-2' | 'octagon' | 'package' | 'paperclip' | 'pause' | 'pause-circle' | 'percent' | 'phone' | 'phone-call' | 'phone-forwarded' | 'phone-incoming' | 'phone-missed' | 'phone-off' | 'phone-outgoing' | 'pie-chart' | 'play' | 'play-circle' | 'plus' | 'plus-circle' | 'plus-square' | 'pocket' | 'power' | 'printer' | 'radio' | 'refresh-ccw' | 'refresh-cw' | 'repeat' | 'rewind' | 'rotate-ccw' | 'rotate-cw' | 'save' | 'scissors' | 'search' | 'server' | 'settings' | 'share' | 'share-2' | 'shield' | 'shopping-cart' | 'shuffle' | 'sidebar' | 'skip-back' | 'skip-forward' | 'slack' | 'slash' | 'sliders' | 'smartphone' | 'speaker' | 'square' | 'star' | 'stop-circle' | 'sun' | 'sunrise' | 'sunset' | 'tablet' | 'tag' | 'target' | 'thermometer' | 'thumbs-down' | 'thumbs-up' | 'toggle-left' | 'toggle-right' | 'trash' | 'trash-2' | 'trending-down' | 'trending-up' | 'triangle' | 'tv' | 'twitter' | 'type' | 'umbrella' | 'underline' | 'unlock' | 'upload' | 'upload-cloud' | 'user' | 'user-check' | 'user-minus' | 'user-plus' | 'user-x' | 'users' | 'video' | 'video-off' | 'voicemail' | 'volume' | 'volume-1' | 'volume-2' | 'volume-x' | 'watch' | 'wifi' | 'wifi-off' | 'wind' | 'x' | 'x-circle' | 'x-square' | 'zap' | 'zoom-in' | 'zoom-out' + } + + interface FontAwesomeProps extends BaseIconProps { + name: 'glass' | 'music' | 'search' | 'envelope-o' | 'heart' | 'star' | 'star-o' | 'user' | 'film' | 'th-large' | 'th' | 'th-list' | 'check' | 'remove' | 'close' | 'times' | 'search-plus' | 'search-minus' | 'power-off' | 'signal' | 'gear' | 'cog' | 'trash-o' | 'home' | 'file-o' | 'clock-o' | 'road' | 'download' | 'arrow-circle-o-down' | 'arrow-circle-o-up' | 'inbox' | 'play-circle-o' | 'rotate-right' | 'repeat' | 'refresh' | 'list-alt' | 'lock' | 'flag' | 'headphones' | 'volume-off' | 'volume-down' | 'volume-up' | 'qrcode' | 'barcode' | 'tag' | 'tags' | 'book' | 'bookmark' | 'print' | 'camera' | 'font' | 'bold' | 'italic' | 'text-height' | 'text-width' | 'align-left' | 'align-center' | 'align-right' | 'align-justify' | 'list' | 'dedent' | 'outdent' | 'indent' | 'video-camera' | 'photo' | 'image' | 'picture-o' | 'pencil' | 'map-marker' | 'adjust' | 'tint' | 'edit' | 'pencil-square-o' | 'share-square-o' | 'check-square-o' | 'arrows' | 'step-backward' | 'fast-backward' | 'backward' | 'play' | 'pause' | 'stop' | 'forward' | 'fast-forward' | 'step-forward' | 'eject' | 'chevron-left' | 'chevron-right' | 'plus-circle' | 'minus-circle' | 'times-circle' | 'check-circle' | 'question-circle' | 'info-circle' | 'crosshairs' | 'times-circle-o' | 'check-circle-o' | 'ban' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-down' | 'mail-forward' | 'share' | 'expand' | 'compress' | 'plus' | 'minus' | 'asterisk' | 'exclamation-circle' | 'gift' | 'leaf' | 'fire' | 'eye' | 'eye-slash' | 'warning' | 'exclamation-triangle' | 'plane' | 'calendar' | 'random' | 'comment' | 'magnet' | 'chevron-up' | 'chevron-down' | 'retweet' | 'shopping-cart' | 'folder' | 'folder-open' | 'arrows-v' | 'arrows-h' | 'bar-chart-o' | 'bar-chart' | 'twitter-square' | 'facebook-square' | 'camera-retro' | 'key' | 'gears' | 'cogs' | 'comments' | 'thumbs-o-up' | 'thumbs-o-down' | 'star-half' | 'heart-o' | 'sign-out' | 'linkedin-square' | 'thumb-tack' | 'external-link' | 'sign-in' | 'trophy' | 'github-square' | 'upload' | 'lemon-o' | 'phone' | 'square-o' | 'bookmark-o' | 'phone-square' | 'twitter' | 'facebook-f' | 'facebook' | 'github' | 'unlock' | 'credit-card' | 'feed' | 'rss' | 'hdd-o' | 'bullhorn' | 'bell' | 'certificate' | 'hand-o-right' | 'hand-o-left' | 'hand-o-up' | 'hand-o-down' | 'arrow-circle-left' | 'arrow-circle-right' | 'arrow-circle-up' | 'arrow-circle-down' | 'globe' | 'wrench' | 'tasks' | 'filter' | 'briefcase' | 'arrows-alt' | 'group' | 'users' | 'chain' | 'link' | 'cloud' | 'flask' | 'cut' | 'scissors' | 'copy' | 'files-o' | 'paperclip' | 'save' | 'floppy-o' | 'square' | 'navicon' | 'reorder' | 'bars' | 'list-ul' | 'list-ol' | 'strikethrough' | 'underline' | 'table' | 'magic' | 'truck' | 'pinterest' | 'pinterest-square' | 'google-plus-square' | 'google-plus' | 'money' | 'caret-down' | 'caret-up' | 'caret-left' | 'caret-right' | 'columns' | 'unsorted' | 'sort' | 'sort-down' | 'sort-desc' | 'sort-up' | 'sort-asc' | 'envelope' | 'linkedin' | 'rotate-left' | 'undo' | 'legal' | 'gavel' | 'dashboard' | 'tachometer' | 'comment-o' | 'comments-o' | 'flash' | 'bolt' | 'sitemap' | 'umbrella' | 'paste' | 'clipboard' | 'lightbulb-o' | 'exchange' | 'cloud-download' | 'cloud-upload' | 'user-md' | 'stethoscope' | 'suitcase' | 'bell-o' | 'coffee' | 'cutlery' | 'file-text-o' | 'building-o' | 'hospital-o' | 'ambulance' | 'medkit' | 'fighter-jet' | 'beer' | 'h-square' | 'plus-square' | 'angle-double-left' | 'angle-double-right' | 'angle-double-up' | 'angle-double-down' | 'angle-left' | 'angle-right' | 'angle-up' | 'angle-down' | 'desktop' | 'laptop' | 'tablet' | 'mobile-phone' | 'mobile' | 'circle-o' | 'quote-left' | 'quote-right' | 'spinner' | 'circle' | 'mail-reply' | 'reply' | 'github-alt' | 'folder-o' | 'folder-open-o' | 'smile-o' | 'frown-o' | 'meh-o' | 'gamepad' | 'keyboard-o' | 'flag-o' | 'flag-checkered' | 'terminal' | 'code' | 'mail-reply-all' | 'reply-all' | 'star-half-empty' | 'star-half-full' | 'star-half-o' | 'location-arrow' | 'crop' | 'code-fork' | 'unlink' | 'chain-broken' | 'question' | 'info' | 'exclamation' | 'superscript' | 'subscript' | 'eraser' | 'puzzle-piece' | 'microphone' | 'microphone-slash' | 'shield' | 'calendar-o' | 'fire-extinguisher' | 'rocket' | 'maxcdn' | 'chevron-circle-left' | 'chevron-circle-right' | 'chevron-circle-up' | 'chevron-circle-down' | 'html5' | 'css3' | 'anchor' | 'unlock-alt' | 'bullseye' | 'ellipsis-h' | 'ellipsis-v' | 'rss-square' | 'play-circle' | 'ticket' | 'minus-square' | 'minus-square-o' | 'level-up' | 'level-down' | 'check-square' | 'pencil-square' | 'external-link-square' | 'share-square' | 'compass' | 'toggle-down' | 'caret-square-o-down' | 'toggle-up' | 'caret-square-o-up' | 'toggle-right' | 'caret-square-o-right' | 'euro' | 'eur' | 'gbp' | 'dollar' | 'usd' | 'rupee' | 'inr' | 'cny' | 'rmb' | 'yen' | 'jpy' | 'ruble' | 'rouble' | 'rub' | 'won' | 'krw' | 'bitcoin' | 'btc' | 'file' | 'file-text' | 'sort-alpha-asc' | 'sort-alpha-desc' | 'sort-amount-asc' | 'sort-amount-desc' | 'sort-numeric-asc' | 'sort-numeric-desc' | 'thumbs-up' | 'thumbs-down' | 'youtube-square' | 'youtube' | 'xing' | 'xing-square' | 'youtube-play' | 'dropbox' | 'stack-overflow' | 'instagram' | 'flickr' | 'adn' | 'bitbucket' | 'bitbucket-square' | 'tumblr' | 'tumblr-square' | 'long-arrow-down' | 'long-arrow-up' | 'long-arrow-left' | 'long-arrow-right' | 'apple' | 'windows' | 'android' | 'linux' | 'dribbble' | 'skype' | 'foursquare' | 'trello' | 'female' | 'male' | 'gittip' | 'gratipay' | 'sun-o' | 'moon-o' | 'archive' | 'bug' | 'vk' | 'weibo' | 'renren' | 'pagelines' | 'stack-exchange' | 'arrow-circle-o-right' | 'arrow-circle-o-left' | 'toggle-left' | 'caret-square-o-left' | 'dot-circle-o' | 'wheelchair' | 'vimeo-square' | 'turkish-lira' | 'try' | 'plus-square-o' | 'space-shuttle' | 'slack' | 'envelope-square' | 'wordpress' | 'openid' | 'institution' | 'bank' | 'university' | 'mortar-board' | 'graduation-cap' | 'yahoo' | 'google' | 'reddit' | 'reddit-square' | 'stumbleupon-circle' | 'stumbleupon' | 'delicious' | 'digg' | 'pied-piper-pp' | 'pied-piper-alt' | 'drupal' | 'joomla' | 'language' | 'fax' | 'building' | 'child' | 'paw' | 'spoon' | 'cube' | 'cubes' | 'behance' | 'behance-square' | 'steam' | 'steam-square' | 'recycle' | 'automobile' | 'car' | 'cab' | 'taxi' | 'tree' | 'spotify' | 'deviantart' | 'soundcloud' | 'database' | 'file-pdf-o' | 'file-word-o' | 'file-excel-o' | 'file-powerpoint-o' | 'file-photo-o' | 'file-picture-o' | 'file-image-o' | 'file-zip-o' | 'file-archive-o' | 'file-sound-o' | 'file-audio-o' | 'file-movie-o' | 'file-video-o' | 'file-code-o' | 'vine' | 'codepen' | 'jsfiddle' | 'life-bouy' | 'life-buoy' | 'life-saver' | 'support' | 'life-ring' | 'circle-o-notch' | 'ra' | 'resistance' | 'rebel' | 'ge' | 'empire' | 'git-square' | 'git' | 'y-combinator-square' | 'yc-square' | 'hacker-news' | 'tencent-weibo' | 'qq' | 'wechat' | 'weixin' | 'send' | 'paper-plane' | 'send-o' | 'paper-plane-o' | 'history' | 'circle-thin' | 'header' | 'paragraph' | 'sliders' | 'share-alt' | 'share-alt-square' | 'bomb' | 'soccer-ball-o' | 'futbol-o' | 'tty' | 'binoculars' | 'plug' | 'slideshare' | 'twitch' | 'yelp' | 'newspaper-o' | 'wifi' | 'calculator' | 'paypal' | 'google-wallet' | 'cc-visa' | 'cc-mastercard' | 'cc-discover' | 'cc-amex' | 'cc-paypal' | 'cc-stripe' | 'bell-slash' | 'bell-slash-o' | 'trash' | 'copyright' | 'at' | 'eyedropper' | 'paint-brush' | 'birthday-cake' | 'area-chart' | 'pie-chart' | 'line-chart' | 'lastfm' | 'lastfm-square' | 'toggle-off' | 'toggle-on' | 'bicycle' | 'bus' | 'ioxhost' | 'angellist' | 'cc' | 'shekel' | 'sheqel' | 'ils' | 'meanpath' | 'buysellads' | 'connectdevelop' | 'dashcube' | 'forumbee' | 'leanpub' | 'sellsy' | 'shirtsinbulk' | 'simplybuilt' | 'skyatlas' | 'cart-plus' | 'cart-arrow-down' | 'diamond' | 'ship' | 'user-secret' | 'motorcycle' | 'street-view' | 'heartbeat' | 'venus' | 'mars' | 'mercury' | 'intersex' | 'transgender' | 'transgender-alt' | 'venus-double' | 'mars-double' | 'venus-mars' | 'mars-stroke' | 'mars-stroke-v' | 'mars-stroke-h' | 'neuter' | 'genderless' | 'facebook-official' | 'pinterest-p' | 'whatsapp' | 'server' | 'user-plus' | 'user-times' | 'hotel' | 'bed' | 'viacoin' | 'train' | 'subway' | 'medium' | 'yc' | 'y-combinator' | 'optin-monster' | 'opencart' | 'expeditedssl' | 'battery-4' | 'battery' | 'battery-full' | 'battery-3' | 'battery-three-quarters' | 'battery-2' | 'battery-half' | 'battery-1' | 'battery-quarter' | 'battery-0' | 'battery-empty' | 'mouse-pointer' | 'i-cursor' | 'object-group' | 'object-ungroup' | 'sticky-note' | 'sticky-note-o' | 'cc-jcb' | 'cc-diners-club' | 'clone' | 'balance-scale' | 'hourglass-o' | 'hourglass-1' | 'hourglass-start' | 'hourglass-2' | 'hourglass-half' | 'hourglass-3' | 'hourglass-end' | 'hourglass' | 'hand-grab-o' | 'hand-rock-o' | 'hand-stop-o' | 'hand-paper-o' | 'hand-scissors-o' | 'hand-lizard-o' | 'hand-spock-o' | 'hand-pointer-o' | 'hand-peace-o' | 'trademark' | 'registered' | 'creative-commons' | 'gg' | 'gg-circle' | 'tripadvisor' | 'odnoklassniki' | 'odnoklassniki-square' | 'get-pocket' | 'wikipedia-w' | 'safari' | 'chrome' | 'firefox' | 'opera' | 'internet-explorer' | 'tv' | 'television' | 'contao' | '500px' | 'amazon' | 'calendar-plus-o' | 'calendar-minus-o' | 'calendar-times-o' | 'calendar-check-o' | 'industry' | 'map-pin' | 'map-signs' | 'map-o' | 'map' | 'commenting' | 'commenting-o' | 'houzz' | 'vimeo' | 'black-tie' | 'fonticons' | 'reddit-alien' | 'edge' | 'credit-card-alt' | 'codiepie' | 'modx' | 'fort-awesome' | 'usb' | 'product-hunt' | 'mixcloud' | 'scribd' | 'pause-circle' | 'pause-circle-o' | 'stop-circle' | 'stop-circle-o' | 'shopping-bag' | 'shopping-basket' | 'hashtag' | 'bluetooth' | 'bluetooth-b' | 'percent' | 'gitlab' | 'wpbeginner' | 'wpforms' | 'envira' | 'universal-access' | 'wheelchair-alt' | 'question-circle-o' | 'blind' | 'audio-description' | 'volume-control-phone' | 'braille' | 'assistive-listening-systems' | 'asl-interpreting' | 'american-sign-language-interpreting' | 'deafness' | 'hard-of-hearing' | 'deaf' | 'glide' | 'glide-g' | 'signing' | 'sign-language' | 'low-vision' | 'viadeo' | 'viadeo-square' | 'snapchat' | 'snapchat-ghost' | 'snapchat-square' | 'pied-piper' | 'first-order' | 'yoast' | 'themeisle' | 'google-plus-circle' | 'google-plus-official' | 'fa' | 'font-awesome' | 'handshake-o' | 'envelope-open' | 'envelope-open-o' | 'linode' | 'address-book' | 'address-book-o' | 'vcard' | 'address-card' | 'vcard-o' | 'address-card-o' | 'user-circle' | 'user-circle-o' | 'user-o' | 'id-badge' | 'drivers-license' | 'id-card' | 'drivers-license-o' | 'id-card-o' | 'quora' | 'free-code-camp' | 'telegram' | 'thermometer-4' | 'thermometer' | 'thermometer-full' | 'thermometer-3' | 'thermometer-three-quarters' | 'thermometer-2' | 'thermometer-half' | 'thermometer-1' | 'thermometer-quarter' | 'thermometer-0' | 'thermometer-empty' | 'shower' | 'bathtub' | 's15' | 'bath' | 'podcast' | 'window-maximize' | 'window-minimize' | 'window-restore' | 'times-rectangle' | 'window-close' | 'times-rectangle-o' | 'window-close-o' | 'bandcamp' | 'grav' | 'etsy' | 'imdb' | 'ravelry' | 'eercast' | 'microchip' | 'snowflake-o' | 'superpowers' | 'wpexplorer' | 'meetup' + } + + interface FoundationProps extends BaseIconProps { + name: 'address-book' | 'alert' | 'align-center' | 'align-justify' | 'align-left' | 'align-right' | 'anchor' | 'annotate' | 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrows-compress' | 'arrows-expand' | 'arrows-in' | 'arrows-out' | 'asl' | 'asterisk' | 'at-sign' | 'background-color' | 'battery-empty' | 'battery-full' | 'battery-half' | 'bitcoin-circle' | 'bitcoin' | 'blind' | 'bluetooth' | 'bold' | 'book-bookmark' | 'book' | 'bookmark' | 'braille' | 'burst-new' | 'burst-sale' | 'burst' | 'calendar' | 'camera' | 'check' | 'checkbox' | 'clipboard-notes' | 'clipboard-pencil' | 'clipboard' | 'clock' | 'closed-caption' | 'cloud' | 'comment-minus' | 'comment-quotes' | 'comment-video' | 'comment' | 'comments' | 'compass' | 'contrast' | 'credit-card' | 'crop' | 'crown' | 'css3' | 'database' | 'die-five' | 'die-four' | 'die-one' | 'die-six' | 'die-three' | 'die-two' | 'dislike' | 'dollar-bill' | 'dollar' | 'download' | 'eject' | 'elevator' | 'euro' | 'eye' | 'fast-forward' | 'female-symbol' | 'female' | 'filter' | 'first-aid' | 'flag' | 'folder-add' | 'folder-lock' | 'folder' | 'foot' | 'foundation' | 'graph-bar' | 'graph-horizontal' | 'graph-pie' | 'graph-trend' | 'guide-dog' | 'hearing-aid' | 'heart' | 'home' | 'html5' | 'indent-less' | 'indent-more' | 'info' | 'italic' | 'key' | 'laptop' | 'layout' | 'lightbulb' | 'like' | 'link' | 'list-bullet' | 'list-number' | 'list-thumbnails' | 'list' | 'lock' | 'loop' | 'magnifying-glass' | 'mail' | 'male-female' | 'male-symbol' | 'male' | 'map' | 'marker' | 'megaphone' | 'microphone' | 'minus-circle' | 'minus' | 'mobile-signal' | 'mobile' | 'monitor' | 'mountains' | 'music' | 'next' | 'no-dogs' | 'no-smoking' | 'page-add' | 'page-copy' | 'page-csv' | 'page-delete' | 'page-doc' | 'page-edit' | 'page-export-csv' | 'page-export-doc' | 'page-export-pdf' | 'page-export' | 'page-filled' | 'page-multiple' | 'page-pdf' | 'page-remove' | 'page-search' | 'page' | 'paint-bucket' | 'paperclip' | 'pause' | 'paw' | 'paypal' | 'pencil' | 'photo' | 'play-circle' | 'play-video' | 'play' | 'plus' | 'pound' | 'power' | 'previous' | 'price-tag' | 'pricetag-multiple' | 'print' | 'prohibited' | 'projection-screen' | 'puzzle' | 'quote' | 'record' | 'refresh' | 'results-demographics' | 'results' | 'rewind-ten' | 'rewind' | 'rss' | 'safety-cone' | 'save' | 'share' | 'sheriff-badge' | 'shield' | 'shopping-bag' | 'shopping-cart' | 'shuffle' | 'skull' | 'social-500px' | 'social-adobe' | 'social-amazon' | 'social-android' | 'social-apple' | 'social-behance' | 'social-bing' | 'social-blogger' | 'social-delicious' | 'social-designer-news' | 'social-deviant-art' | 'social-digg' | 'social-dribbble' | 'social-drive' | 'social-dropbox' | 'social-evernote' | 'social-facebook' | 'social-flickr' | 'social-forrst' | 'social-foursquare' | 'social-game-center' | 'social-github' | 'social-google-plus' | 'social-hacker-news' | 'social-hi5' | 'social-instagram' | 'social-joomla' | 'social-lastfm' | 'social-linkedin' | 'social-medium' | 'social-myspace' | 'social-orkut' | 'social-path' | 'social-picasa' | 'social-pinterest' | 'social-rdio' | 'social-reddit' | 'social-skillshare' | 'social-skype' | 'social-smashing-mag' | 'social-snapchat' | 'social-spotify' | 'social-squidoo' | 'social-stack-overflow' | 'social-steam' | 'social-stumbleupon' | 'social-treehouse' | 'social-tumblr' | 'social-twitter' | 'social-vimeo' | 'social-windows' | 'social-xbox' | 'social-yahoo' | 'social-yelp' | 'social-youtube' | 'social-zerply' | 'social-zurb' | 'sound' | 'star' | 'stop' | 'strikethrough' | 'subscript' | 'superscript' | 'tablet-landscape' | 'tablet-portrait' | 'target-two' | 'target' | 'telephone-accessible' | 'telephone' | 'text-color' | 'thumbnails' | 'ticket' | 'torso-business' | 'torso-female' | 'torso' | 'torsos-all-female' | 'torsos-all' | 'torsos-female-male' | 'torsos-male-female' | 'torsos' | 'trash' | 'trees' | 'trophy' | 'underline' | 'universal-access' | 'unlink' | 'unlock' | 'upload-cloud' | 'upload' | 'usb' | 'video' | 'volume-none' | 'volume-strike' | 'volume' | 'web' | 'wheelchair' | 'widget' | 'wrench' | 'x-circle' | 'x' | 'yen' | 'zoom-in' | 'zoom-out' + } + + interface IoniconsProps extends BaseIconProps { + name: 'ios-add' | 'ios-add-circle' | 'ios-add-circle-outline' | 'ios-add-outline' | 'ios-alarm' | 'ios-alarm-outline' | 'ios-albums' | 'ios-albums-outline' | 'ios-alert' | 'ios-alert-outline' | 'ios-american-football' | 'ios-american-football-outline' | 'ios-analytics' | 'ios-analytics-outline' | 'ios-aperture' | 'ios-aperture-outline' | 'ios-apps' | 'ios-apps-outline' | 'ios-appstore' | 'ios-appstore-outline' | 'ios-archive' | 'ios-archive-outline' | 'ios-arrow-back' | 'ios-arrow-back-outline' | 'ios-arrow-down' | 'ios-arrow-down-outline' | 'ios-arrow-dropdown' | 'ios-arrow-dropdown-circle' | 'ios-arrow-dropdown-circle-outline' | 'ios-arrow-dropdown-outline' | 'ios-arrow-dropleft' | 'ios-arrow-dropleft-circle' | 'ios-arrow-dropleft-circle-outline' | 'ios-arrow-dropleft-outline' | 'ios-arrow-dropright' | 'ios-arrow-dropright-circle' | 'ios-arrow-dropright-circle-outline' | 'ios-arrow-dropright-outline' | 'ios-arrow-dropup' | 'ios-arrow-dropup-circle' | 'ios-arrow-dropup-circle-outline' | 'ios-arrow-dropup-outline' | 'ios-arrow-forward' | 'ios-arrow-forward-outline' | 'ios-arrow-round-back' | 'ios-arrow-round-back-outline' | 'ios-arrow-round-down' | 'ios-arrow-round-down-outline' | 'ios-arrow-round-forward' | 'ios-arrow-round-forward-outline' | 'ios-arrow-round-up' | 'ios-arrow-round-up-outline' | 'ios-arrow-up' | 'ios-arrow-up-outline' | 'ios-at' | 'ios-at-outline' | 'ios-attach' | 'ios-attach-outline' | 'ios-backspace' | 'ios-backspace-outline' | 'ios-barcode' | 'ios-barcode-outline' | 'ios-baseball' | 'ios-baseball-outline' | 'ios-basket' | 'ios-basket-outline' | 'ios-basketball' | 'ios-basketball-outline' | 'ios-battery-charging' | 'ios-battery-charging-outline' | 'ios-battery-dead' | 'ios-battery-dead-outline' | 'ios-battery-full' | 'ios-battery-full-outline' | 'ios-beaker' | 'ios-beaker-outline' | 'ios-beer' | 'ios-beer-outline' | 'ios-bicycle' | 'ios-bicycle-outline' | 'ios-bluetooth' | 'ios-bluetooth-outline' | 'ios-boat' | 'ios-boat-outline' | 'ios-body' | 'ios-body-outline' | 'ios-bonfire' | 'ios-bonfire-outline' | 'ios-book' | 'ios-book-outline' | 'ios-bookmark' | 'ios-bookmark-outline' | 'ios-bookmarks' | 'ios-bookmarks-outline' | 'ios-bowtie' | 'ios-bowtie-outline' | 'ios-briefcase' | 'ios-briefcase-outline' | 'ios-browsers' | 'ios-browsers-outline' | 'ios-brush' | 'ios-brush-outline' | 'ios-bug' | 'ios-bug-outline' | 'ios-build' | 'ios-build-outline' | 'ios-bulb' | 'ios-bulb-outline' | 'ios-bus' | 'ios-bus-outline' | 'ios-cafe' | 'ios-cafe-outline' | 'ios-calculator' | 'ios-calculator-outline' | 'ios-calendar' | 'ios-calendar-outline' | 'ios-call' | 'ios-call-outline' | 'ios-camera' | 'ios-camera-outline' | 'ios-car' | 'ios-car-outline' | 'ios-card' | 'ios-card-outline' | 'ios-cart' | 'ios-cart-outline' | 'ios-cash' | 'ios-cash-outline' | 'ios-chatboxes' | 'ios-chatboxes-outline' | 'ios-chatbubbles' | 'ios-chatbubbles-outline' | 'ios-checkbox' | 'ios-checkbox-outline' | 'ios-checkmark' | 'ios-checkmark-circle' | 'ios-checkmark-circle-outline' | 'ios-checkmark-outline' | 'ios-clipboard' | 'ios-clipboard-outline' | 'ios-clock' | 'ios-clock-outline' | 'ios-close' | 'ios-close-circle' | 'ios-close-circle-outline' | 'ios-close-outline' | 'ios-closed-captioning' | 'ios-closed-captioning-outline' | 'ios-cloud' | 'ios-cloud-circle' | 'ios-cloud-circle-outline' | 'ios-cloud-done' | 'ios-cloud-done-outline' | 'ios-cloud-download' | 'ios-cloud-download-outline' | 'ios-cloud-outline' | 'ios-cloud-upload' | 'ios-cloud-upload-outline' | 'ios-cloudy' | 'ios-cloudy-night' | 'ios-cloudy-night-outline' | 'ios-cloudy-outline' | 'ios-code' | 'ios-code-download' | 'ios-code-download-outline' | 'ios-code-outline' | 'ios-code-working' | 'ios-code-working-outline' | 'ios-cog' | 'ios-cog-outline' | 'ios-color-fill' | 'ios-color-fill-outline' | 'ios-color-filter' | 'ios-color-filter-outline' | 'ios-color-palette' | 'ios-color-palette-outline' | 'ios-color-wand' | 'ios-color-wand-outline' | 'ios-compass' | 'ios-compass-outline' | 'ios-construct' | 'ios-construct-outline' | 'ios-contact' | 'ios-contact-outline' | 'ios-contacts' | 'ios-contacts-outline' | 'ios-contract' | 'ios-contract-outline' | 'ios-contrast' | 'ios-contrast-outline' | 'ios-copy' | 'ios-copy-outline' | 'ios-create' | 'ios-create-outline' | 'ios-crop' | 'ios-crop-outline' | 'ios-cube' | 'ios-cube-outline' | 'ios-cut' | 'ios-cut-outline' | 'ios-desktop' | 'ios-desktop-outline' | 'ios-disc' | 'ios-disc-outline' | 'ios-document' | 'ios-document-outline' | 'ios-done-all' | 'ios-done-all-outline' | 'ios-download' | 'ios-download-outline' | 'ios-easel' | 'ios-easel-outline' | 'ios-egg' | 'ios-egg-outline' | 'ios-exit' | 'ios-exit-outline' | 'ios-expand' | 'ios-expand-outline' | 'ios-eye' | 'ios-eye-off' | 'ios-eye-off-outline' | 'ios-eye-outline' | 'ios-fastforward' | 'ios-fastforward-outline' | 'ios-female' | 'ios-female-outline' | 'ios-filing' | 'ios-filing-outline' | 'ios-film' | 'ios-film-outline' | 'ios-finger-print' | 'ios-finger-print-outline' | 'ios-flag' | 'ios-flag-outline' | 'ios-flame' | 'ios-flame-outline' | 'ios-flash' | 'ios-flash-outline' | 'ios-flask' | 'ios-flask-outline' | 'ios-flower' | 'ios-flower-outline' | 'ios-folder' | 'ios-folder-open' | 'ios-folder-open-outline' | 'ios-folder-outline' | 'ios-football' | 'ios-football-outline' | 'ios-funnel' | 'ios-funnel-outline' | 'ios-game-controller-a' | 'ios-game-controller-a-outline' | 'ios-game-controller-b' | 'ios-game-controller-b-outline' | 'ios-git-branch' | 'ios-git-branch-outline' | 'ios-git-commit' | 'ios-git-commit-outline' | 'ios-git-compare' | 'ios-git-compare-outline' | 'ios-git-merge' | 'ios-git-merge-outline' | 'ios-git-network' | 'ios-git-network-outline' | 'ios-git-pull-request' | 'ios-git-pull-request-outline' | 'ios-glasses' | 'ios-glasses-outline' | 'ios-globe' | 'ios-globe-outline' | 'ios-grid' | 'ios-grid-outline' | 'ios-hammer' | 'ios-hammer-outline' | 'ios-hand' | 'ios-hand-outline' | 'ios-happy' | 'ios-happy-outline' | 'ios-headset' | 'ios-headset-outline' | 'ios-heart' | 'ios-heart-outline' | 'ios-help' | 'ios-help-buoy' | 'ios-help-buoy-outline' | 'ios-help-circle' | 'ios-help-circle-outline' | 'ios-help-outline' | 'ios-home' | 'ios-home-outline' | 'ios-ice-cream' | 'ios-ice-cream-outline' | 'ios-image' | 'ios-image-outline' | 'ios-images' | 'ios-images-outline' | 'ios-infinite' | 'ios-infinite-outline' | 'ios-information' | 'ios-information-circle' | 'ios-information-circle-outline' | 'ios-information-outline' | 'ios-ionic' | 'ios-ionic-outline' | 'ios-ionitron' | 'ios-ionitron-outline' | 'ios-jet' | 'ios-jet-outline' | 'ios-key' | 'ios-key-outline' | 'ios-keypad' | 'ios-keypad-outline' | 'ios-laptop' | 'ios-laptop-outline' | 'ios-leaf' | 'ios-leaf-outline' | 'ios-link' | 'ios-link-outline' | 'ios-list' | 'ios-list-box' | 'ios-list-box-outline' | 'ios-list-outline' | 'ios-locate' | 'ios-locate-outline' | 'ios-lock' | 'ios-lock-outline' | 'ios-log-in' | 'ios-log-in-outline' | 'ios-log-out' | 'ios-log-out-outline' | 'ios-magnet' | 'ios-magnet-outline' | 'ios-mail' | 'ios-mail-open' | 'ios-mail-open-outline' | 'ios-mail-outline' | 'ios-male' | 'ios-male-outline' | 'ios-man' | 'ios-man-outline' | 'ios-map' | 'ios-map-outline' | 'ios-medal' | 'ios-medal-outline' | 'ios-medical' | 'ios-medical-outline' | 'ios-medkit' | 'ios-medkit-outline' | 'ios-megaphone' | 'ios-megaphone-outline' | 'ios-menu' | 'ios-menu-outline' | 'ios-mic' | 'ios-mic-off' | 'ios-mic-off-outline' | 'ios-mic-outline' | 'ios-microphone' | 'ios-microphone-outline' | 'ios-moon' | 'ios-moon-outline' | 'ios-more' | 'ios-more-outline' | 'ios-move' | 'ios-move-outline' | 'ios-musical-note' | 'ios-musical-note-outline' | 'ios-musical-notes' | 'ios-musical-notes-outline' | 'ios-navigate' | 'ios-navigate-outline' | 'ios-no-smoking' | 'ios-no-smoking-outline' | 'ios-notifications' | 'ios-notifications-off' | 'ios-notifications-off-outline' | 'ios-notifications-outline' | 'ios-nuclear' | 'ios-nuclear-outline' | 'ios-nutrition' | 'ios-nutrition-outline' | 'ios-open' | 'ios-open-outline' | 'ios-options' | 'ios-options-outline' | 'ios-outlet' | 'ios-outlet-outline' | 'ios-paper' | 'ios-paper-outline' | 'ios-paper-plane' | 'ios-paper-plane-outline' | 'ios-partly-sunny' | 'ios-partly-sunny-outline' | 'ios-pause' | 'ios-pause-outline' | 'ios-paw' | 'ios-paw-outline' | 'ios-people' | 'ios-people-outline' | 'ios-person' | 'ios-person-add' | 'ios-person-add-outline' | 'ios-person-outline' | 'ios-phone-landscape' | 'ios-phone-landscape-outline' | 'ios-phone-portrait' | 'ios-phone-portrait-outline' | 'ios-photos' | 'ios-photos-outline' | 'ios-pie' | 'ios-pie-outline' | 'ios-pin' | 'ios-pin-outline' | 'ios-pint' | 'ios-pint-outline' | 'ios-pizza' | 'ios-pizza-outline' | 'ios-plane' | 'ios-plane-outline' | 'ios-planet' | 'ios-planet-outline' | 'ios-play' | 'ios-play-outline' | 'ios-podium' | 'ios-podium-outline' | 'ios-power' | 'ios-power-outline' | 'ios-pricetag' | 'ios-pricetag-outline' | 'ios-pricetags' | 'ios-pricetags-outline' | 'ios-print' | 'ios-print-outline' | 'ios-pulse' | 'ios-pulse-outline' | 'ios-qr-scanner' | 'ios-qr-scanner-outline' | 'ios-quote' | 'ios-quote-outline' | 'ios-radio' | 'ios-radio-button-off' | 'ios-radio-button-off-outline' | 'ios-radio-button-on' | 'ios-radio-button-on-outline' | 'ios-radio-outline' | 'ios-rainy' | 'ios-rainy-outline' | 'ios-recording' | 'ios-recording-outline' | 'ios-redo' | 'ios-redo-outline' | 'ios-refresh' | 'ios-refresh-circle' | 'ios-refresh-circle-outline' | 'ios-refresh-outline' | 'ios-remove' | 'ios-remove-circle' | 'ios-remove-circle-outline' | 'ios-remove-outline' | 'ios-reorder' | 'ios-reorder-outline' | 'ios-repeat' | 'ios-repeat-outline' | 'ios-resize' | 'ios-resize-outline' | 'ios-restaurant' | 'ios-restaurant-outline' | 'ios-return-left' | 'ios-return-left-outline' | 'ios-return-right' | 'ios-return-right-outline' | 'ios-reverse-camera' | 'ios-reverse-camera-outline' | 'ios-rewind' | 'ios-rewind-outline' | 'ios-ribbon' | 'ios-ribbon-outline' | 'ios-rose' | 'ios-rose-outline' | 'ios-sad' | 'ios-sad-outline' | 'ios-school' | 'ios-school-outline' | 'ios-search' | 'ios-search-outline' | 'ios-send' | 'ios-send-outline' | 'ios-settings' | 'ios-settings-outline' | 'ios-share' | 'ios-share-alt' | 'ios-share-alt-outline' | 'ios-share-outline' | 'ios-shirt' | 'ios-shirt-outline' | 'ios-shuffle' | 'ios-shuffle-outline' | 'ios-skip-backward' | 'ios-skip-backward-outline' | 'ios-skip-forward' | 'ios-skip-forward-outline' | 'ios-snow' | 'ios-snow-outline' | 'ios-speedometer' | 'ios-speedometer-outline' | 'ios-square' | 'ios-square-outline' | 'ios-star' | 'ios-star-half' | 'ios-star-half-outline' | 'ios-star-outline' | 'ios-stats' | 'ios-stats-outline' | 'ios-stopwatch' | 'ios-stopwatch-outline' | 'ios-subway' | 'ios-subway-outline' | 'ios-sunny' | 'ios-sunny-outline' | 'ios-swap' | 'ios-swap-outline' | 'ios-switch' | 'ios-switch-outline' | 'ios-sync' | 'ios-sync-outline' | 'ios-tablet-landscape' | 'ios-tablet-landscape-outline' | 'ios-tablet-portrait' | 'ios-tablet-portrait-outline' | 'ios-tennisball' | 'ios-tennisball-outline' | 'ios-text' | 'ios-text-outline' | 'ios-thermometer' | 'ios-thermometer-outline' | 'ios-thumbs-down' | 'ios-thumbs-down-outline' | 'ios-thumbs-up' | 'ios-thumbs-up-outline' | 'ios-thunderstorm' | 'ios-thunderstorm-outline' | 'ios-time' | 'ios-time-outline' | 'ios-timer' | 'ios-timer-outline' | 'ios-train' | 'ios-train-outline' | 'ios-transgender' | 'ios-transgender-outline' | 'ios-trash' | 'ios-trash-outline' | 'ios-trending-down' | 'ios-trending-down-outline' | 'ios-trending-up' | 'ios-trending-up-outline' | 'ios-trophy' | 'ios-trophy-outline' | 'ios-umbrella' | 'ios-umbrella-outline' | 'ios-undo' | 'ios-undo-outline' | 'ios-unlock' | 'ios-unlock-outline' | 'ios-videocam' | 'ios-videocam-outline' | 'ios-volume-down' | 'ios-volume-down-outline' | 'ios-volume-mute' | 'ios-volume-mute-outline' | 'ios-volume-off' | 'ios-volume-off-outline' | 'ios-volume-up' | 'ios-volume-up-outline' | 'ios-walk' | 'ios-walk-outline' | 'ios-warning' | 'ios-warning-outline' | 'ios-watch' | 'ios-watch-outline' | 'ios-water' | 'ios-water-outline' | 'ios-wifi' | 'ios-wifi-outline' | 'ios-wine' | 'ios-wine-outline' | 'ios-woman' | 'ios-woman-outline' | 'logo-android' | 'logo-angular' | 'logo-apple' | 'logo-bitcoin' | 'logo-buffer' | 'logo-chrome' | 'logo-codepen' | 'logo-css3' | 'logo-designernews' | 'logo-dribbble' | 'logo-dropbox' | 'logo-euro' | 'logo-facebook' | 'logo-foursquare' | 'logo-freebsd-devil' | 'logo-github' | 'logo-google' | 'logo-googleplus' | 'logo-hackernews' | 'logo-html5' | 'logo-instagram' | 'logo-javascript' | 'logo-linkedin' | 'logo-markdown' | 'logo-nodejs' | 'logo-octocat' | 'logo-pinterest' | 'logo-playstation' | 'logo-python' | 'logo-reddit' | 'logo-rss' | 'logo-sass' | 'logo-skype' | 'logo-snapchat' | 'logo-steam' | 'logo-tumblr' | 'logo-tux' | 'logo-twitch' | 'logo-twitter' | 'logo-usd' | 'logo-vimeo' | 'logo-whatsapp' | 'logo-windows' | 'logo-wordpress' | 'logo-xbox' | 'logo-yahoo' | 'logo-yen' | 'logo-youtube' | 'md-add' | 'md-add-circle' | 'md-alarm' | 'md-albums' | 'md-alert' | 'md-american-football' | 'md-analytics' | 'md-aperture' | 'md-apps' | 'md-appstore' | 'md-archive' | 'md-arrow-back' | 'md-arrow-down' | 'md-arrow-dropdown' | 'md-arrow-dropdown-circle' | 'md-arrow-dropleft' | 'md-arrow-dropleft-circle' | 'md-arrow-dropright' | 'md-arrow-dropright-circle' | 'md-arrow-dropup' | 'md-arrow-dropup-circle' | 'md-arrow-forward' | 'md-arrow-round-back' | 'md-arrow-round-down' | 'md-arrow-round-forward' | 'md-arrow-round-up' | 'md-arrow-up' | 'md-at' | 'md-attach' | 'md-backspace' | 'md-barcode' | 'md-baseball' | 'md-basket' | 'md-basketball' | 'md-battery-charging' | 'md-battery-dead' | 'md-battery-full' | 'md-beaker' | 'md-beer' | 'md-bicycle' | 'md-bluetooth' | 'md-boat' | 'md-body' | 'md-bonfire' | 'md-book' | 'md-bookmark' | 'md-bookmarks' | 'md-bowtie' | 'md-briefcase' | 'md-browsers' | 'md-brush' | 'md-bug' | 'md-build' | 'md-bulb' | 'md-bus' | 'md-cafe' | 'md-calculator' | 'md-calendar' | 'md-call' | 'md-camera' | 'md-car' | 'md-card' | 'md-cart' | 'md-cash' | 'md-chatboxes' | 'md-chatbubbles' | 'md-checkbox' | 'md-checkbox-outline' | 'md-checkmark' | 'md-checkmark-circle' | 'md-checkmark-circle-outline' | 'md-clipboard' | 'md-clock' | 'md-close' | 'md-close-circle' | 'md-closed-captioning' | 'md-cloud' | 'md-cloud-circle' | 'md-cloud-done' | 'md-cloud-download' | 'md-cloud-outline' | 'md-cloud-upload' | 'md-cloudy' | 'md-cloudy-night' | 'md-code' | 'md-code-download' | 'md-code-working' | 'md-cog' | 'md-color-fill' | 'md-color-filter' | 'md-color-palette' | 'md-color-wand' | 'md-compass' | 'md-construct' | 'md-contact' | 'md-contacts' | 'md-contract' | 'md-contrast' | 'md-copy' | 'md-create' | 'md-crop' | 'md-cube' | 'md-cut' | 'md-desktop' | 'md-disc' | 'md-document' | 'md-done-all' | 'md-download' | 'md-easel' | 'md-egg' | 'md-exit' | 'md-expand' | 'md-eye' | 'md-eye-off' | 'md-fastforward' | 'md-female' | 'md-filing' | 'md-film' | 'md-finger-print' | 'md-flag' | 'md-flame' | 'md-flash' | 'md-flask' | 'md-flower' | 'md-folder' | 'md-folder-open' | 'md-football' | 'md-funnel' | 'md-game-controller-a' | 'md-game-controller-b' | 'md-git-branch' | 'md-git-commit' | 'md-git-compare' | 'md-git-merge' | 'md-git-network' | 'md-git-pull-request' | 'md-glasses' | 'md-globe' | 'md-grid' | 'md-hammer' | 'md-hand' | 'md-happy' | 'md-headset' | 'md-heart' | 'md-heart-outline' | 'md-help' | 'md-help-buoy' | 'md-help-circle' | 'md-home' | 'md-ice-cream' | 'md-image' | 'md-images' | 'md-infinite' | 'md-information' | 'md-information-circle' | 'md-ionic' | 'md-ionitron' | 'md-jet' | 'md-key' | 'md-keypad' | 'md-laptop' | 'md-leaf' | 'md-link' | 'md-list' | 'md-list-box' | 'md-locate' | 'md-lock' | 'md-log-in' | 'md-log-out' | 'md-magnet' | 'md-mail' | 'md-mail-open' | 'md-male' | 'md-man' | 'md-map' | 'md-medal' | 'md-medical' | 'md-medkit' | 'md-megaphone' | 'md-menu' | 'md-mic' | 'md-mic-off' | 'md-microphone' | 'md-moon' | 'md-more' | 'md-move' | 'md-musical-note' | 'md-musical-notes' | 'md-navigate' | 'md-no-smoking' | 'md-notifications' | 'md-notifications-off' | 'md-notifications-outline' | 'md-nuclear' | 'md-nutrition' | 'md-open' | 'md-options' | 'md-outlet' | 'md-paper' | 'md-paper-plane' | 'md-partly-sunny' | 'md-pause' | 'md-paw' | 'md-people' | 'md-person' | 'md-person-add' | 'md-phone-landscape' | 'md-phone-portrait' | 'md-photos' | 'md-pie' | 'md-pin' | 'md-pint' | 'md-pizza' | 'md-plane' | 'md-planet' | 'md-play' | 'md-podium' | 'md-power' | 'md-pricetag' | 'md-pricetags' | 'md-print' | 'md-pulse' | 'md-qr-scanner' | 'md-quote' | 'md-radio' | 'md-radio-button-off' | 'md-radio-button-on' | 'md-rainy' | 'md-recording' | 'md-redo' | 'md-refresh' | 'md-refresh-circle' | 'md-remove' | 'md-remove-circle' | 'md-reorder' | 'md-repeat' | 'md-resize' | 'md-restaurant' | 'md-return-left' | 'md-return-right' | 'md-reverse-camera' | 'md-rewind' | 'md-ribbon' | 'md-rose' | 'md-sad' | 'md-school' | 'md-search' | 'md-send' | 'md-settings' | 'md-share' | 'md-share-alt' | 'md-shirt' | 'md-shuffle' | 'md-skip-backward' | 'md-skip-forward' | 'md-snow' | 'md-speedometer' | 'md-square' | 'md-square-outline' | 'md-star' | 'md-star-half' | 'md-star-outline' | 'md-stats' | 'md-stopwatch' | 'md-subway' | 'md-sunny' | 'md-swap' | 'md-switch' | 'md-sync' | 'md-tablet-landscape' | 'md-tablet-portrait' | 'md-tennisball' | 'md-text' | 'md-thermometer' | 'md-thumbs-down' | 'md-thumbs-up' | 'md-thunderstorm' | 'md-time' | 'md-timer' | 'md-train' | 'md-transgender' | 'md-trash' | 'md-trending-down' | 'md-trending-up' | 'md-trophy' | 'md-umbrella' | 'md-undo' | 'md-unlock' | 'md-videocam' | 'md-volume-down' | 'md-volume-mute' | 'md-volume-off' | 'md-volume-up' | 'md-walk' | 'md-warning' | 'md-watch' | 'md-water' | 'md-wifi' | 'md-wine' | 'md-woman' + } + + interface MaterialCommunityIconsProps extends BaseIconProps { + name: 'access-point' | 'access-point-network' | 'account' | 'account-alert' | 'account-box' | 'account-box-outline' | 'account-card-details' | 'account-check' | 'account-circle' | 'account-convert' | 'account-edit' | 'account-key' | 'account-location' | 'account-minus' | 'account-multiple' | 'account-multiple-minus' | 'account-multiple-outline' | 'account-multiple-plus' | 'account-network' | 'account-off' | 'account-outline' | 'account-plus' | 'account-remove' | 'account-search' | 'account-settings' | 'account-settings-variant' | 'account-star' | 'account-switch' | 'adjust' | 'air-conditioner' | 'airballoon' | 'airplane' | 'airplane-landing' | 'airplane-off' | 'airplane-takeoff' | 'airplay' | 'alarm' | 'alarm-bell' | 'alarm-check' | 'alarm-light' | 'alarm-multiple' | 'alarm-off' | 'alarm-plus' | 'alarm-snooze' | 'album' | 'alert' | 'alert-box' | 'alert-circle' | 'alert-circle-outline' | 'alert-decagram' | 'alert-octagon' | 'alert-octagram' | 'alert-outline' | 'all-inclusive' | 'alpha' | 'alphabetical' | 'altimeter' | 'amazon' | 'amazon-clouddrive' | 'ambulance' | 'amplifier' | 'anchor' | 'android' | 'android-debug-bridge' | 'android-head' | 'android-studio' | 'angular' | 'angularjs' | 'animation' | 'apple' | 'apple-finder' | 'apple-ios' | 'apple-keyboard-caps' | 'apple-keyboard-command' | 'apple-keyboard-control' | 'apple-keyboard-option' | 'apple-keyboard-shift' | 'apple-mobileme' | 'apple-safari' | 'application' | 'approval' | 'apps' | 'archive' | 'arrange-bring-forward' | 'arrange-bring-to-front' | 'arrange-send-backward' | 'arrange-send-to-back' | 'arrow-all' | 'arrow-bottom-left' | 'arrow-bottom-right' | 'arrow-collapse' | 'arrow-collapse-all' | 'arrow-collapse-down' | 'arrow-collapse-left' | 'arrow-collapse-right' | 'arrow-collapse-up' | 'arrow-down' | 'arrow-down-bold' | 'arrow-down-bold-box' | 'arrow-down-bold-box-outline' | 'arrow-down-bold-circle' | 'arrow-down-bold-circle-outline' | 'arrow-down-bold-hexagon-outline' | 'arrow-down-box' | 'arrow-down-drop-circle' | 'arrow-down-drop-circle-outline' | 'arrow-down-thick' | 'arrow-expand' | 'arrow-expand-all' | 'arrow-expand-down' | 'arrow-expand-left' | 'arrow-expand-right' | 'arrow-expand-up' | 'arrow-left' | 'arrow-left-bold' | 'arrow-left-bold-box' | 'arrow-left-bold-box-outline' | 'arrow-left-bold-circle' | 'arrow-left-bold-circle-outline' | 'arrow-left-bold-hexagon-outline' | 'arrow-left-box' | 'arrow-left-drop-circle' | 'arrow-left-drop-circle-outline' | 'arrow-left-thick' | 'arrow-right' | 'arrow-right-bold' | 'arrow-right-bold-box' | 'arrow-right-bold-box-outline' | 'arrow-right-bold-circle' | 'arrow-right-bold-circle-outline' | 'arrow-right-bold-hexagon-outline' | 'arrow-right-box' | 'arrow-right-drop-circle' | 'arrow-right-drop-circle-outline' | 'arrow-right-thick' | 'arrow-top-left' | 'arrow-top-right' | 'arrow-up' | 'arrow-up-bold' | 'arrow-up-bold-box' | 'arrow-up-bold-box-outline' | 'arrow-up-bold-circle' | 'arrow-up-bold-circle-outline' | 'arrow-up-bold-hexagon-outline' | 'arrow-up-box' | 'arrow-up-drop-circle' | 'arrow-up-drop-circle-outline' | 'arrow-up-thick' | 'assistant' | 'asterisk' | 'at' | 'atom' | 'attachment' | 'audiobook' | 'auto-fix' | 'auto-upload' | 'autorenew' | 'av-timer' | 'baby' | 'baby-buggy' | 'backburger' | 'backspace' | 'backup-restore' | 'bandcamp' | 'bank' | 'barcode' | 'barcode-scan' | 'barley' | 'barrel' | 'basecamp' | 'basket' | 'basket-fill' | 'basket-unfill' | 'battery' | 'battery-10' | 'battery-20' | 'battery-30' | 'battery-40' | 'battery-50' | 'battery-60' | 'battery-70' | 'battery-80' | 'battery-90' | 'battery-alert' | 'battery-charging' | 'battery-charging-100' | 'battery-charging-20' | 'battery-charging-30' | 'battery-charging-40' | 'battery-charging-60' | 'battery-charging-80' | 'battery-charging-90' | 'battery-minus' | 'battery-negative' | 'battery-outline' | 'battery-plus' | 'battery-positive' | 'battery-unknown' | 'beach' | 'beaker' | 'beats' | 'beer' | 'behance' | 'bell' | 'bell-off' | 'bell-outline' | 'bell-plus' | 'bell-ring' | 'bell-ring-outline' | 'bell-sleep' | 'beta' | 'bible' | 'bike' | 'bing' | 'binoculars' | 'bio' | 'biohazard' | 'bitbucket' | 'black-mesa' | 'blackberry' | 'blender' | 'blinds' | 'block-helper' | 'blogger' | 'bluetooth' | 'bluetooth-audio' | 'bluetooth-connect' | 'bluetooth-off' | 'bluetooth-settings' | 'bluetooth-transfer' | 'blur' | 'blur-linear' | 'blur-off' | 'blur-radial' | 'bomb' | 'bomb-off' | 'bone' | 'book' | 'book-minus' | 'book-multiple' | 'book-multiple-variant' | 'book-open' | 'book-open-page-variant' | 'book-open-variant' | 'book-plus' | 'book-secure' | 'book-unsecure' | 'book-variant' | 'bookmark' | 'bookmark-check' | 'bookmark-music' | 'bookmark-outline' | 'bookmark-plus' | 'bookmark-plus-outline' | 'bookmark-remove' | 'boombox' | 'bootstrap' | 'border-all' | 'border-bottom' | 'border-color' | 'border-horizontal' | 'border-inside' | 'border-left' | 'border-none' | 'border-outside' | 'border-right' | 'border-style' | 'border-top' | 'border-vertical' | 'bow-tie' | 'bowl' | 'bowling' | 'box' | 'box-cutter' | 'box-shadow' | 'bridge' | 'briefcase' | 'briefcase-check' | 'briefcase-download' | 'briefcase-upload' | 'brightness-1' | 'brightness-2' | 'brightness-3' | 'brightness-4' | 'brightness-5' | 'brightness-6' | 'brightness-7' | 'brightness-auto' | 'broom' | 'brush' | 'buffer' | 'bug' | 'bulletin-board' | 'bullhorn' | 'bullseye' | 'burst-mode' | 'bus' | 'bus-articulated-end' | 'bus-articulated-front' | 'bus-double-decker' | 'bus-school' | 'bus-side' | 'cached' | 'cake' | 'cake-layered' | 'cake-variant' | 'calculator' | 'calendar' | 'calendar-blank' | 'calendar-check' | 'calendar-clock' | 'calendar-multiple' | 'calendar-multiple-check' | 'calendar-plus' | 'calendar-question' | 'calendar-range' | 'calendar-remove' | 'calendar-text' | 'calendar-today' | 'call-made' | 'call-merge' | 'call-missed' | 'call-received' | 'call-split' | 'camcorder' | 'camcorder-box' | 'camcorder-box-off' | 'camcorder-off' | 'camera' | 'camera-burst' | 'camera-enhance' | 'camera-front' | 'camera-front-variant' | 'camera-gopro' | 'camera-iris' | 'camera-metering-center' | 'camera-metering-matrix' | 'camera-metering-partial' | 'camera-metering-spot' | 'camera-off' | 'camera-party-mode' | 'camera-rear' | 'camera-rear-variant' | 'camera-switch' | 'camera-timer' | 'cancel' | 'candle' | 'candycane' | 'cannabis' | 'car' | 'car-battery' | 'car-connected' | 'car-convertable' | 'car-estate' | 'car-hatchback' | 'car-pickup' | 'car-side' | 'car-sports' | 'car-wash' | 'caravan' | 'cards' | 'cards-outline' | 'cards-playing-outline' | 'cards-variant' | 'carrot' | 'cart' | 'cart-off' | 'cart-outline' | 'cart-plus' | 'case-sensitive-alt' | 'cash' | 'cash-100' | 'cash-multiple' | 'cash-usd' | 'cast' | 'cast-connected' | 'cast-off' | 'castle' | 'cat' | 'cctv' | 'ceiling-light' | 'cellphone' | 'cellphone-android' | 'cellphone-basic' | 'cellphone-dock' | 'cellphone-iphone' | 'cellphone-link' | 'cellphone-link-off' | 'cellphone-settings' | 'certificate' | 'chair-school' | 'chart-arc' | 'chart-areaspline' | 'chart-bar' | 'chart-bar-stacked' | 'chart-bubble' | 'chart-donut' | 'chart-donut-variant' | 'chart-gantt' | 'chart-histogram' | 'chart-line' | 'chart-line-stacked' | 'chart-line-variant' | 'chart-pie' | 'chart-scatterplot-hexbin' | 'chart-timeline' | 'check' | 'check-all' | 'check-circle' | 'check-circle-outline' | 'checkbox-blank' | 'checkbox-blank-circle' | 'checkbox-blank-circle-outline' | 'checkbox-blank-outline' | 'checkbox-marked' | 'checkbox-marked-circle' | 'checkbox-marked-circle-outline' | 'checkbox-marked-outline' | 'checkbox-multiple-blank' | 'checkbox-multiple-blank-circle' | 'checkbox-multiple-blank-circle-outline' | 'checkbox-multiple-blank-outline' | 'checkbox-multiple-marked' | 'checkbox-multiple-marked-circle' | 'checkbox-multiple-marked-circle-outline' | 'checkbox-multiple-marked-outline' | 'checkerboard' | 'chemical-weapon' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-double-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chili-hot' | 'chili-medium' | 'chili-mild' | 'chip' | 'church' | 'circle' | 'circle-outline' | 'cisco-webex' | 'city' | 'clipboard' | 'clipboard-account' | 'clipboard-alert' | 'clipboard-arrow-down' | 'clipboard-arrow-left' | 'clipboard-check' | 'clipboard-flow' | 'clipboard-outline' | 'clipboard-plus' | 'clipboard-text' | 'clippy' | 'clock' | 'clock-alert' | 'clock-end' | 'clock-fast' | 'clock-in' | 'clock-out' | 'clock-start' | 'close' | 'close-box' | 'close-box-outline' | 'close-circle' | 'close-circle-outline' | 'close-network' | 'close-octagon' | 'close-octagon-outline' | 'close-outline' | 'closed-caption' | 'cloud' | 'cloud-braces' | 'cloud-check' | 'cloud-circle' | 'cloud-download' | 'cloud-off-outline' | 'cloud-outline' | 'cloud-print' | 'cloud-print-outline' | 'cloud-sync' | 'cloud-tags' | 'cloud-upload' | 'code-array' | 'code-braces' | 'code-brackets' | 'code-equal' | 'code-greater-than' | 'code-greater-than-or-equal' | 'code-less-than' | 'code-less-than-or-equal' | 'code-not-equal' | 'code-not-equal-variant' | 'code-parentheses' | 'code-string' | 'code-tags' | 'code-tags-check' | 'codepen' | 'coffee' | 'coffee-outline' | 'coffee-to-go' | 'coin' | 'coins' | 'collage' | 'color-helper' | 'comment' | 'comment-account' | 'comment-account-outline' | 'comment-alert' | 'comment-alert-outline' | 'comment-check' | 'comment-check-outline' | 'comment-multiple-outline' | 'comment-outline' | 'comment-plus-outline' | 'comment-processing' | 'comment-processing-outline' | 'comment-question-outline' | 'comment-remove-outline' | 'comment-text' | 'comment-text-outline' | 'compare' | 'compass' | 'compass-outline' | 'console' | 'console-line' | 'contact-mail' | 'contacts' | 'content-copy' | 'content-cut' | 'content-duplicate' | 'content-paste' | 'content-save' | 'content-save-all' | 'content-save-settings' | 'contrast' | 'contrast-box' | 'contrast-circle' | 'cookie' | 'copyright' | 'corn' | 'counter' | 'cow' | 'creation' | 'credit-card' | 'credit-card-multiple' | 'credit-card-off' | 'credit-card-plus' | 'credit-card-scan' | 'crop' | 'crop-free' | 'crop-landscape' | 'crop-portrait' | 'crop-rotate' | 'crop-square' | 'crosshairs' | 'crosshairs-gps' | 'crown' | 'cube' | 'cube-outline' | 'cube-send' | 'cube-unfolded' | 'cup' | 'cup-off' | 'cup-water' | 'currency-btc' | 'currency-chf' | 'currency-cny' | 'currency-eth' | 'currency-eur' | 'currency-gbp' | 'currency-inr' | 'currency-jpy' | 'currency-krw' | 'currency-ngn' | 'currency-rub' | 'currency-sign' | 'currency-try' | 'currency-twd' | 'currency-usd' | 'currency-usd-off' | 'cursor-default' | 'cursor-default-outline' | 'cursor-move' | 'cursor-pointer' | 'cursor-text' | 'database' | 'database-minus' | 'database-plus' | 'debug-step-into' | 'debug-step-out' | 'debug-step-over' | 'decagram' | 'decagram-outline' | 'decimal-decrease' | 'decimal-increase' | 'delete' | 'delete-circle' | 'delete-empty' | 'delete-forever' | 'delete-sweep' | 'delete-variant' | 'delta' | 'deskphone' | 'desktop-classic' | 'desktop-mac' | 'desktop-tower' | 'details' | 'developer-board' | 'deviantart' | 'dialpad' | 'diamond' | 'dice-1' | 'dice-2' | 'dice-3' | 'dice-4' | 'dice-5' | 'dice-6' | 'dice-d10' | 'dice-d20' | 'dice-d4' | 'dice-d6' | 'dice-d8' | 'dice-multiple' | 'dictionary' | 'dip-switch' | 'directions' | 'directions-fork' | 'discord' | 'disk' | 'disk-alert' | 'disqus' | 'disqus-outline' | 'division' | 'division-box' | 'dna' | 'dns' | 'do-not-disturb' | 'do-not-disturb-off' | 'dolby' | 'domain' | 'donkey' | 'dots-horizontal' | 'dots-horizontal-circle' | 'dots-vertical' | 'dots-vertical-circle' | 'douban' | 'download' | 'download-network' | 'drag' | 'drag-horizontal' | 'drag-vertical' | 'drawing' | 'drawing-box' | 'dribbble' | 'dribbble-box' | 'drone' | 'dropbox' | 'drupal' | 'duck' | 'dumbbell' | 'ear-hearing' | 'earth' | 'earth-box' | 'earth-box-off' | 'earth-off' | 'edge' | 'eject' | 'elephant' | 'elevation-decline' | 'elevation-rise' | 'elevator' | 'email' | 'email-alert' | 'email-open' | 'email-open-outline' | 'email-outline' | 'email-secure' | 'email-variant' | 'emby' | 'emoticon' | 'emoticon-cool' | 'emoticon-dead' | 'emoticon-devil' | 'emoticon-excited' | 'emoticon-happy' | 'emoticon-neutral' | 'emoticon-poop' | 'emoticon-sad' | 'emoticon-tongue' | 'engine' | 'engine-outline' | 'equal' | 'equal-box' | 'eraser' | 'eraser-variant' | 'escalator' | 'ethernet' | 'ethernet-cable' | 'ethernet-cable-off' | 'etsy' | 'ev-station' | 'eventbrite' | 'evernote' | 'exclamation' | 'exit-to-app' | 'export' | 'eye' | 'eye-off' | 'eye-off-outline' | 'eye-outline' | 'eyedropper' | 'eyedropper-variant' | 'face' | 'face-profile' | 'facebook' | 'facebook-box' | 'facebook-messenger' | 'factory' | 'fan' | 'fast-forward' | 'fast-forward-outline' | 'fax' | 'feather' | 'ferry' | 'file' | 'file-account' | 'file-chart' | 'file-check' | 'file-cloud' | 'file-delimited' | 'file-document' | 'file-document-box' | 'file-excel' | 'file-excel-box' | 'file-export' | 'file-find' | 'file-hidden' | 'file-image' | 'file-import' | 'file-lock' | 'file-multiple' | 'file-music' | 'file-outline' | 'file-pdf' | 'file-pdf-box' | 'file-plus' | 'file-powerpoint' | 'file-powerpoint-box' | 'file-presentation-box' | 'file-restore' | 'file-send' | 'file-tree' | 'file-video' | 'file-word' | 'file-word-box' | 'file-xml' | 'film' | 'filmstrip' | 'filmstrip-off' | 'filter' | 'filter-outline' | 'filter-remove' | 'filter-remove-outline' | 'filter-variant' | 'find-replace' | 'fingerprint' | 'fire' | 'firefox' | 'fish' | 'flag' | 'flag-checkered' | 'flag-outline' | 'flag-outline-variant' | 'flag-triangle' | 'flag-variant' | 'flash' | 'flash-auto' | 'flash-off' | 'flash-outline' | 'flash-red-eye' | 'flashlight' | 'flashlight-off' | 'flask' | 'flask-empty' | 'flask-empty-outline' | 'flask-outline' | 'flattr' | 'flip-to-back' | 'flip-to-front' | 'floppy' | 'flower' | 'folder' | 'folder-account' | 'folder-download' | 'folder-google-drive' | 'folder-image' | 'folder-lock' | 'folder-lock-open' | 'folder-move' | 'folder-multiple' | 'folder-multiple-image' | 'folder-multiple-outline' | 'folder-open' | 'folder-outline' | 'folder-plus' | 'folder-remove' | 'folder-star' | 'folder-upload' | 'font-awesome' | 'food' | 'food-apple' | 'food-croissant' | 'food-fork-drink' | 'food-off' | 'food-variant' | 'football' | 'football-australian' | 'football-helmet' | 'forklift' | 'format-align-bottom' | 'format-align-center' | 'format-align-justify' | 'format-align-left' | 'format-align-middle' | 'format-align-right' | 'format-align-top' | 'format-annotation-plus' | 'format-bold' | 'format-clear' | 'format-color-fill' | 'format-color-text' | 'format-float-center' | 'format-float-left' | 'format-float-none' | 'format-float-right' | 'format-font' | 'format-header-1' | 'format-header-2' | 'format-header-3' | 'format-header-4' | 'format-header-5' | 'format-header-6' | 'format-header-decrease' | 'format-header-equal' | 'format-header-increase' | 'format-header-pound' | 'format-horizontal-align-center' | 'format-horizontal-align-left' | 'format-horizontal-align-right' | 'format-indent-decrease' | 'format-indent-increase' | 'format-italic' | 'format-line-spacing' | 'format-line-style' | 'format-line-weight' | 'format-list-bulleted' | 'format-list-bulleted-type' | 'format-list-checks' | 'format-list-numbers' | 'format-page-break' | 'format-paint' | 'format-paragraph' | 'format-pilcrow' | 'format-quote-close' | 'format-quote-open' | 'format-rotate-90' | 'format-section' | 'format-size' | 'format-strikethrough' | 'format-strikethrough-variant' | 'format-subscript' | 'format-superscript' | 'format-text' | 'format-textdirection-l-to-r' | 'format-textdirection-r-to-l' | 'format-title' | 'format-underline' | 'format-vertical-align-bottom' | 'format-vertical-align-center' | 'format-vertical-align-top' | 'format-wrap-inline' | 'format-wrap-square' | 'format-wrap-tight' | 'format-wrap-top-bottom' | 'forum' | 'forward' | 'foursquare' | 'fridge' | 'fridge-filled' | 'fridge-filled-bottom' | 'fridge-filled-top' | 'fuel' | 'fullscreen' | 'fullscreen-exit' | 'function' | 'gamepad' | 'gamepad-variant' | 'garage' | 'garage-open' | 'gas-cylinder' | 'gas-station' | 'gate' | 'gauge' | 'gavel' | 'gender-female' | 'gender-male' | 'gender-male-female' | 'gender-transgender' | 'gesture' | 'gesture-double-tap' | 'gesture-swipe-down' | 'gesture-swipe-left' | 'gesture-swipe-right' | 'gesture-swipe-up' | 'gesture-tap' | 'gesture-two-double-tap' | 'gesture-two-tap' | 'ghost' | 'gift' | 'git' | 'github-box' | 'github-circle' | 'github-face' | 'glass-flute' | 'glass-mug' | 'glass-stange' | 'glass-tulip' | 'glassdoor' | 'glasses' | 'gmail' | 'gnome' | 'gondola' | 'google' | 'google-analytics' | 'google-assistant' | 'google-cardboard' | 'google-chrome' | 'google-circles' | 'google-circles-communities' | 'google-circles-extended' | 'google-circles-group' | 'google-controller' | 'google-controller-off' | 'google-drive' | 'google-earth' | 'google-glass' | 'google-keep' | 'google-maps' | 'google-nearby' | 'google-pages' | 'google-photos' | 'google-physical-web' | 'google-play' | 'google-plus' | 'google-plus-box' | 'google-translate' | 'google-wallet' | 'gradient' | 'grease-pencil' | 'grid' | 'grid-large' | 'grid-off' | 'group' | 'guitar-acoustic' | 'guitar-electric' | 'guitar-pick' | 'guitar-pick-outline' | 'hackernews' | 'hamburger' | 'hand-pointing-right' | 'hanger' | 'hangouts' | 'harddisk' | 'headphones' | 'headphones-box' | 'headphones-off' | 'headphones-settings' | 'headset' | 'headset-dock' | 'headset-off' | 'heart' | 'heart-box' | 'heart-box-outline' | 'heart-broken' | 'heart-half' | 'heart-half-full' | 'heart-half-outline' | 'heart-off' | 'heart-outline' | 'heart-pulse' | 'help' | 'help-box' | 'help-circle' | 'help-circle-outline' | 'help-network' | 'hexagon' | 'hexagon-multiple' | 'hexagon-outline' | 'high-definition' | 'highway' | 'history' | 'hololens' | 'home' | 'home-assistant' | 'home-automation' | 'home-circle' | 'home-map-marker' | 'home-modern' | 'home-outline' | 'home-variant' | 'hook' | 'hook-off' | 'hops' | 'hospital' | 'hospital-building' | 'hospital-marker' | 'hotel' | 'houzz' | 'houzz-box' | 'human' | 'human-child' | 'human-female' | 'human-greeting' | 'human-handsdown' | 'human-handsup' | 'human-male' | 'human-male-female' | 'human-pregnant' | 'humble-bundle' | 'image' | 'image-album' | 'image-area' | 'image-area-close' | 'image-broken' | 'image-broken-variant' | 'image-filter' | 'image-filter-black-white' | 'image-filter-center-focus' | 'image-filter-center-focus-weak' | 'image-filter-drama' | 'image-filter-frames' | 'image-filter-hdr' | 'image-filter-none' | 'image-filter-tilt-shift' | 'image-filter-vintage' | 'image-multiple' | 'import' | 'inbox' | 'inbox-arrow-down' | 'inbox-arrow-up' | 'incognito' | 'infinity' | 'information' | 'information-outline' | 'information-variant' | 'instagram' | 'instapaper' | 'internet-explorer' | 'invert-colors' | 'itunes' | 'jeepney' | 'jira' | 'jsfiddle' | 'json' | 'keg' | 'kettle' | 'key' | 'key-change' | 'key-minus' | 'key-plus' | 'key-remove' | 'key-variant' | 'keyboard' | 'keyboard-backspace' | 'keyboard-caps' | 'keyboard-close' | 'keyboard-off' | 'keyboard-return' | 'keyboard-tab' | 'keyboard-variant' | 'kickstarter' | 'kodi' | 'label' | 'label-outline' | 'lambda' | 'lamp' | 'lan' | 'lan-connect' | 'lan-disconnect' | 'lan-pending' | 'language-c' | 'language-cpp' | 'language-csharp' | 'language-css3' | 'language-go' | 'language-html5' | 'language-javascript' | 'language-php' | 'language-python' | 'language-python-text' | 'language-r' | 'language-swift' | 'language-typescript' | 'laptop' | 'laptop-chromebook' | 'laptop-mac' | 'laptop-off' | 'laptop-windows' | 'lastfm' | 'launch' | 'lava-lamp' | 'layers' | 'layers-off' | 'lead-pencil' | 'leaf' | 'led-off' | 'led-on' | 'led-outline' | 'led-strip' | 'led-variant-off' | 'led-variant-on' | 'led-variant-outline' | 'library' | 'library-books' | 'library-music' | 'library-plus' | 'lightbulb' | 'lightbulb-on' | 'lightbulb-on-outline' | 'lightbulb-outline' | 'link' | 'link-off' | 'link-variant' | 'link-variant-off' | 'linkedin' | 'linkedin-box' | 'linux' | 'loading' | 'lock' | 'lock-open' | 'lock-open-outline' | 'lock-outline' | 'lock-pattern' | 'lock-plus' | 'lock-reset' | 'locker' | 'locker-multiple' | 'login' | 'login-variant' | 'logout' | 'logout-variant' | 'looks' | 'loop' | 'loupe' | 'lumx' | 'magnet' | 'magnet-on' | 'magnify' | 'magnify-minus' | 'magnify-minus-outline' | 'magnify-plus' | 'magnify-plus-outline' | 'mail-ru' | 'mailbox' | 'map' | 'map-marker' | 'map-marker-circle' | 'map-marker-minus' | 'map-marker-multiple' | 'map-marker-off' | 'map-marker-outline' | 'map-marker-plus' | 'map-marker-radius' | 'margin' | 'markdown' | 'marker' | 'marker-check' | 'martini' | 'material-ui' | 'math-compass' | 'matrix' | 'maxcdn' | 'medical-bag' | 'medium' | 'memory' | 'menu' | 'menu-down' | 'menu-down-outline' | 'menu-left' | 'menu-right' | 'menu-up' | 'menu-up-outline' | 'message' | 'message-alert' | 'message-bulleted' | 'message-bulleted-off' | 'message-draw' | 'message-image' | 'message-outline' | 'message-plus' | 'message-processing' | 'message-reply' | 'message-reply-text' | 'message-settings' | 'message-settings-variant' | 'message-text' | 'message-text-outline' | 'message-video' | 'meteor' | 'metronome' | 'metronome-tick' | 'micro-sd' | 'microphone' | 'microphone-off' | 'microphone-outline' | 'microphone-settings' | 'microphone-variant' | 'microphone-variant-off' | 'microscope' | 'microsoft' | 'minecraft' | 'minus' | 'minus-box' | 'minus-box-outline' | 'minus-circle' | 'minus-circle-outline' | 'minus-network' | 'mixcloud' | 'mixer' | 'monitor' | 'monitor-multiple' | 'more' | 'motorbike' | 'mouse' | 'mouse-off' | 'mouse-variant' | 'mouse-variant-off' | 'move-resize' | 'move-resize-variant' | 'movie' | 'movie-roll' | 'multiplication' | 'multiplication-box' | 'mushroom' | 'mushroom-outline' | 'music' | 'music-box' | 'music-box-outline' | 'music-circle' | 'music-note' | 'music-note-bluetooth' | 'music-note-bluetooth-off' | 'music-note-eighth' | 'music-note-half' | 'music-note-off' | 'music-note-quarter' | 'music-note-sixteenth' | 'music-note-whole' | 'music-off' | 'nature' | 'nature-people' | 'navigation' | 'near-me' | 'needle' | 'nest-protect' | 'nest-thermostat' | 'netflix' | 'network' | 'new-box' | 'newspaper' | 'nfc' | 'nfc-tap' | 'nfc-variant' | 'ninja' | 'nintendo-switch' | 'nodejs' | 'note' | 'note-multiple' | 'note-multiple-outline' | 'note-outline' | 'note-plus' | 'note-plus-outline' | 'note-text' | 'notification-clear-all' | 'npm' | 'nuke' | 'null' | 'numeric' | 'numeric-0-box' | 'numeric-0-box-multiple-outline' | 'numeric-0-box-outline' | 'numeric-1-box' | 'numeric-1-box-multiple-outline' | 'numeric-1-box-outline' | 'numeric-2-box' | 'numeric-2-box-multiple-outline' | 'numeric-2-box-outline' | 'numeric-3-box' | 'numeric-3-box-multiple-outline' | 'numeric-3-box-outline' | 'numeric-4-box' | 'numeric-4-box-multiple-outline' | 'numeric-4-box-outline' | 'numeric-5-box' | 'numeric-5-box-multiple-outline' | 'numeric-5-box-outline' | 'numeric-6-box' | 'numeric-6-box-multiple-outline' | 'numeric-6-box-outline' | 'numeric-7-box' | 'numeric-7-box-multiple-outline' | 'numeric-7-box-outline' | 'numeric-8-box' | 'numeric-8-box-multiple-outline' | 'numeric-8-box-outline' | 'numeric-9-box' | 'numeric-9-box-multiple-outline' | 'numeric-9-box-outline' | 'numeric-9-plus-box' | 'numeric-9-plus-box-multiple-outline' | 'numeric-9-plus-box-outline' | 'nut' | 'nutrition' | 'oar' | 'octagon' | 'octagon-outline' | 'octagram' | 'octagram-outline' | 'odnoklassniki' | 'office' | 'oil' | 'oil-temperature' | 'omega' | 'onedrive' | 'onenote' | 'opacity' | 'open-in-app' | 'open-in-new' | 'openid' | 'opera' | 'orbit' | 'ornament' | 'ornament-variant' | 'owl' | 'package' | 'package-down' | 'package-up' | 'package-variant' | 'package-variant-closed' | 'page-first' | 'page-last' | 'page-layout-body' | 'page-layout-footer' | 'page-layout-header' | 'page-layout-sidebar-left' | 'page-layout-sidebar-right' | 'palette' | 'palette-advanced' | 'panda' | 'pandora' | 'panorama' | 'panorama-fisheye' | 'panorama-horizontal' | 'panorama-vertical' | 'panorama-wide-angle' | 'paper-cut-vertical' | 'paperclip' | 'parking' | 'passport' | 'pause' | 'pause-circle' | 'pause-circle-outline' | 'pause-octagon' | 'pause-octagon-outline' | 'paw' | 'paw-off' | 'pen' | 'pencil' | 'pencil-box' | 'pencil-box-outline' | 'pencil-circle' | 'pencil-circle-outline' | 'pencil-lock' | 'pencil-off' | 'pentagon' | 'pentagon-outline' | 'percent' | 'periodic-table-co2' | 'periscope' | 'pharmacy' | 'phone' | 'phone-bluetooth' | 'phone-classic' | 'phone-forward' | 'phone-hangup' | 'phone-in-talk' | 'phone-incoming' | 'phone-locked' | 'phone-log' | 'phone-minus' | 'phone-missed' | 'phone-outgoing' | 'phone-paused' | 'phone-plus' | 'phone-settings' | 'phone-voip' | 'pi' | 'pi-box' | 'piano' | 'pig' | 'pill' | 'pillar' | 'pin' | 'pin-off' | 'pine-tree' | 'pine-tree-box' | 'pinterest' | 'pinterest-box' | 'pipe' | 'pipe-disconnected' | 'pistol' | 'pizza' | 'plane-shield' | 'play' | 'play-box-outline' | 'play-circle' | 'play-circle-outline' | 'play-pause' | 'play-protected-content' | 'playlist-check' | 'playlist-minus' | 'playlist-play' | 'playlist-plus' | 'playlist-remove' | 'playstation' | 'plex' | 'plus' | 'plus-box' | 'plus-box-outline' | 'plus-circle' | 'plus-circle-multiple-outline' | 'plus-circle-outline' | 'plus-network' | 'plus-one' | 'plus-outline' | 'pocket' | 'pokeball' | 'polaroid' | 'poll' | 'poll-box' | 'polymer' | 'pool' | 'popcorn' | 'pot' | 'pot-mix' | 'pound' | 'pound-box' | 'power' | 'power-plug' | 'power-plug-off' | 'power-settings' | 'power-socket' | 'power-socket-eu' | 'power-socket-uk' | 'power-socket-us' | 'prescription' | 'presentation' | 'presentation-play' | 'printer' | 'printer-3d' | 'printer-alert' | 'printer-settings' | 'priority-high' | 'priority-low' | 'professional-hexagon' | 'projector' | 'projector-screen' | 'publish' | 'pulse' | 'puzzle' | 'qqchat' | 'qrcode' | 'qrcode-scan' | 'quadcopter' | 'quality-high' | 'quicktime' | 'radar' | 'radiator' | 'radio' | 'radio-handheld' | 'radio-tower' | 'radioactive' | 'radiobox-blank' | 'radiobox-marked' | 'raspberrypi' | 'ray-end' | 'ray-end-arrow' | 'ray-start' | 'ray-start-arrow' | 'ray-start-end' | 'ray-vertex' | 'rdio' | 'react' | 'read' | 'readability' | 'receipt' | 'record' | 'record-rec' | 'recycle' | 'reddit' | 'redo' | 'redo-variant' | 'refresh' | 'regex' | 'relative-scale' | 'reload' | 'remote' | 'rename-box' | 'reorder-horizontal' | 'reorder-vertical' | 'repeat' | 'repeat-off' | 'repeat-once' | 'replay' | 'reply' | 'reply-all' | 'reproduction' | 'resize-bottom-right' | 'responsive' | 'restart' | 'restore' | 'rewind' | 'rewind-outline' | 'rhombus' | 'rhombus-outline' | 'ribbon' | 'rice' | 'ring' | 'road' | 'road-variant' | 'robot' | 'rocket' | 'roomba' | 'rotate-3d' | 'rotate-left' | 'rotate-left-variant' | 'rotate-right' | 'rotate-right-variant' | 'rounded-corner' | 'router-wireless' | 'routes' | 'rowing' | 'rss' | 'rss-box' | 'ruler' | 'run' | 'run-fast' | 'sale' | 'sass' | 'satellite' | 'satellite-variant' | 'saxophone' | 'scale' | 'scale-balance' | 'scale-bathroom' | 'scanner' | 'school' | 'screen-rotation' | 'screen-rotation-lock' | 'screwdriver' | 'script' | 'sd' | 'seal' | 'search-web' | 'seat-flat' | 'seat-flat-angled' | 'seat-individual-suite' | 'seat-legroom-extra' | 'seat-legroom-normal' | 'seat-legroom-reduced' | 'seat-recline-extra' | 'seat-recline-normal' | 'security' | 'security-home' | 'security-network' | 'select' | 'select-all' | 'select-inverse' | 'select-off' | 'selection' | 'selection-off' | 'send' | 'send-secure' | 'serial-port' | 'server' | 'server-minus' | 'server-network' | 'server-network-off' | 'server-off' | 'server-plus' | 'server-remove' | 'server-security' | 'set-all' | 'set-center' | 'set-center-right' | 'set-left' | 'set-left-center' | 'set-left-right' | 'set-none' | 'set-right' | 'settings' | 'settings-box' | 'shape-circle-plus' | 'shape-plus' | 'shape-polygon-plus' | 'shape-rectangle-plus' | 'shape-square-plus' | 'share' | 'share-variant' | 'shield' | 'shield-half-full' | 'shield-outline' | 'shopping' | 'shopping-music' | 'shovel' | 'shovel-off' | 'shredder' | 'shuffle' | 'shuffle-disabled' | 'shuffle-variant' | 'sigma' | 'sigma-lower' | 'sign-caution' | 'sign-direction' | 'sign-text' | 'signal' | 'signal-2g' | 'signal-3g' | 'signal-4g' | 'signal-hspa' | 'signal-hspa-plus' | 'signal-off' | 'signal-variant' | 'silverware' | 'silverware-fork' | 'silverware-spoon' | 'silverware-variant' | 'sim' | 'sim-alert' | 'sim-off' | 'sitemap' | 'skip-backward' | 'skip-forward' | 'skip-next' | 'skip-next-circle' | 'skip-next-circle-outline' | 'skip-previous' | 'skip-previous-circle' | 'skip-previous-circle-outline' | 'skull' | 'skype' | 'skype-business' | 'slack' | 'sleep' | 'sleep-off' | 'smoking' | 'smoking-off' | 'snapchat' | 'snowflake' | 'snowman' | 'soccer' | 'sofa' | 'solid' | 'sort' | 'sort-alphabetical' | 'sort-ascending' | 'sort-descending' | 'sort-numeric' | 'sort-variant' | 'soundcloud' | 'source-branch' | 'source-commit' | 'source-commit-end' | 'source-commit-end-local' | 'source-commit-local' | 'source-commit-next-local' | 'source-commit-start' | 'source-commit-start-next-local' | 'source-fork' | 'source-merge' | 'source-pull' | 'soy-sauce' | 'speaker' | 'speaker-off' | 'speaker-wireless' | 'speedometer' | 'spellcheck' | 'spotify' | 'spotlight' | 'spotlight-beam' | 'spray' | 'square' | 'square-inc' | 'square-inc-cash' | 'square-outline' | 'square-root' | 'stackexchange' | 'stackoverflow' | 'stadium' | 'stairs' | 'standard-definition' | 'star' | 'star-circle' | 'star-half' | 'star-off' | 'star-outline' | 'steam' | 'steering' | 'step-backward' | 'step-backward-2' | 'step-forward' | 'step-forward-2' | 'stethoscope' | 'sticker' | 'sticker-emoji' | 'stocking' | 'stop' | 'stop-circle' | 'stop-circle-outline' | 'store' | 'store-24-hour' | 'stove' | 'subdirectory-arrow-left' | 'subdirectory-arrow-right' | 'subway' | 'subway-variant' | 'summit' | 'sunglasses' | 'surround-sound' | 'surround-sound-2-0' | 'surround-sound-3-1' | 'surround-sound-5-1' | 'surround-sound-7-1' | 'svg' | 'swap-horizontal' | 'swap-vertical' | 'swim' | 'switch' | 'sword' | 'sword-cross' | 'sync' | 'sync-alert' | 'sync-off' | 'tab' | 'tab-plus' | 'tab-unselected' | 'table' | 'table-column-plus-after' | 'table-column-plus-before' | 'table-column-remove' | 'table-column-width' | 'table-edit' | 'table-large' | 'table-row-height' | 'table-row-plus-after' | 'table-row-plus-before' | 'table-row-remove' | 'tablet' | 'tablet-android' | 'tablet-ipad' | 'taco' | 'tag' | 'tag-faces' | 'tag-heart' | 'tag-multiple' | 'tag-outline' | 'tag-plus' | 'tag-remove' | 'tag-text-outline' | 'target' | 'taxi' | 'teamviewer' | 'telegram' | 'television' | 'television-classic' | 'television-guide' | 'temperature-celsius' | 'temperature-fahrenheit' | 'temperature-kelvin' | 'tennis' | 'tent' | 'terrain' | 'test-tube' | 'text-shadow' | 'text-to-speech' | 'text-to-speech-off' | 'textbox' | 'textbox-password' | 'texture' | 'theater' | 'theme-light-dark' | 'thermometer' | 'thermometer-lines' | 'thought-bubble' | 'thought-bubble-outline' | 'thumb-down' | 'thumb-down-outline' | 'thumb-up' | 'thumb-up-outline' | 'thumbs-up-down' | 'ticket' | 'ticket-account' | 'ticket-confirmation' | 'ticket-percent' | 'tie' | 'tilde' | 'timelapse' | 'timer' | 'timer-10' | 'timer-3' | 'timer-off' | 'timer-sand' | 'timer-sand-empty' | 'timer-sand-full' | 'timetable' | 'toggle-switch' | 'toggle-switch-off' | 'tooltip' | 'tooltip-edit' | 'tooltip-image' | 'tooltip-outline' | 'tooltip-outline-plus' | 'tooltip-text' | 'tooth' | 'tor' | 'tower-beach' | 'tower-fire' | 'trackpad' | 'traffic-light' | 'train' | 'tram' | 'transcribe' | 'transcribe-close' | 'transfer' | 'transit-transfer' | 'translate' | 'treasure-chest' | 'tree' | 'trello' | 'trending-down' | 'trending-neutral' | 'trending-up' | 'triangle' | 'triangle-outline' | 'trophy' | 'trophy-award' | 'trophy-outline' | 'trophy-variant' | 'trophy-variant-outline' | 'truck' | 'truck-delivery' | 'truck-fast' | 'truck-trailer' | 'tshirt-crew' | 'tshirt-v' | 'tumblr' | 'tumblr-reblog' | 'tune' | 'tune-vertical' | 'twitch' | 'twitter' | 'twitter-box' | 'twitter-circle' | 'twitter-retweet' | 'uber' | 'ubuntu' | 'ultra-high-definition' | 'umbraco' | 'umbrella' | 'umbrella-outline' | 'undo' | 'undo-variant' | 'unfold-less-horizontal' | 'unfold-less-vertical' | 'unfold-more-horizontal' | 'unfold-more-vertical' | 'ungroup' | 'unity' | 'untappd' | 'update' | 'upload' | 'upload-network' | 'usb' | 'van-passenger' | 'van-utility' | 'vanish' | 'vector-arrange-above' | 'vector-arrange-below' | 'vector-circle' | 'vector-circle-variant' | 'vector-combine' | 'vector-curve' | 'vector-difference' | 'vector-difference-ab' | 'vector-difference-ba' | 'vector-intersection' | 'vector-line' | 'vector-point' | 'vector-polygon' | 'vector-polyline' | 'vector-radius' | 'vector-rectangle' | 'vector-selection' | 'vector-square' | 'vector-triangle' | 'vector-union' | 'verified' | 'vibrate' | 'video' | 'video-3d' | 'video-off' | 'video-switch' | 'view-agenda' | 'view-array' | 'view-carousel' | 'view-column' | 'view-dashboard' | 'view-day' | 'view-grid' | 'view-headline' | 'view-list' | 'view-module' | 'view-parallel' | 'view-quilt' | 'view-sequential' | 'view-stream' | 'view-week' | 'vimeo' | 'vine' | 'violin' | 'visualstudio' | 'vk' | 'vk-box' | 'vk-circle' | 'vlc' | 'voice' | 'voicemail' | 'volume-high' | 'volume-low' | 'volume-medium' | 'volume-minus' | 'volume-mute' | 'volume-off' | 'volume-plus' | 'vpn' | 'walk' | 'wall' | 'wallet' | 'wallet-giftcard' | 'wallet-membership' | 'wallet-travel' | 'wan' | 'washing-machine' | 'watch' | 'watch-export' | 'watch-import' | 'watch-vibrate' | 'water' | 'water-off' | 'water-percent' | 'water-pump' | 'watermark' | 'waves' | 'weather-cloudy' | 'weather-fog' | 'weather-hail' | 'weather-lightning' | 'weather-lightning-rainy' | 'weather-night' | 'weather-partlycloudy' | 'weather-pouring' | 'weather-rainy' | 'weather-snowy' | 'weather-snowy-rainy' | 'weather-sunny' | 'weather-sunset' | 'weather-sunset-down' | 'weather-sunset-up' | 'weather-windy' | 'weather-windy-variant' | 'web' | 'webcam' | 'webhook' | 'webpack' | 'wechat' | 'weight' | 'weight-kilogram' | 'whatsapp' | 'wheelchair-accessibility' | 'white-balance-auto' | 'white-balance-incandescent' | 'white-balance-iridescent' | 'white-balance-sunny' | 'widgets' | 'wifi' | 'wifi-off' | 'wii' | 'wiiu' | 'wikipedia' | 'window-close' | 'window-closed' | 'window-maximize' | 'window-minimize' | 'window-open' | 'window-restore' | 'windows' | 'wordpress' | 'worker' | 'wrap' | 'wrench' | 'wunderlist' | 'xaml' | 'xbox' | 'xbox-controller' | 'xbox-controller-battery-alert' | 'xbox-controller-battery-empty' | 'xbox-controller-battery-full' | 'xbox-controller-battery-low' | 'xbox-controller-battery-medium' | 'xbox-controller-battery-unknown' | 'xbox-controller-off' | 'xda' | 'xing' | 'xing-box' | 'xing-circle' | 'xml' | 'xmpp' | 'yammer' | 'yeast' | 'yelp' | 'yin-yang' | 'youtube-play' | 'zip-box' | 'blank' + } + + interface MaterialIconsProps extends BaseIconProps { + name: '3d-rotation' | 'ac-unit' | 'access-alarm' | 'access-alarms' | 'access-time' | 'accessibility' | 'accessible' | 'account-balance' | 'account-balance-wallet' | 'account-box' | 'account-circle' | 'adb' | 'add' | 'add-a-photo' | 'add-alarm' | 'add-alert' | 'add-box' | 'add-circle' | 'add-circle-outline' | 'add-location' | 'add-shopping-cart' | 'add-to-photos' | 'add-to-queue' | 'adjust' | 'airline-seat-flat' | 'airline-seat-flat-angled' | 'airline-seat-individual-suite' | 'airline-seat-legroom-extra' | 'airline-seat-legroom-normal' | 'airline-seat-legroom-reduced' | 'airline-seat-recline-extra' | 'airline-seat-recline-normal' | 'airplanemode-active' | 'airplanemode-inactive' | 'airplay' | 'airport-shuttle' | 'alarm' | 'alarm-add' | 'alarm-off' | 'alarm-on' | 'album' | 'all-inclusive' | 'all-out' | 'android' | 'announcement' | 'apps' | 'archive' | 'arrow-back' | 'arrow-downward' | 'arrow-drop-down' | 'arrow-drop-down-circle' | 'arrow-drop-up' | 'arrow-forward' | 'arrow-upward' | 'art-track' | 'aspect-ratio' | 'assessment' | 'assignment' | 'assignment-ind' | 'assignment-late' | 'assignment-return' | 'assignment-returned' | 'assignment-turned-in' | 'assistant' | 'assistant-photo' | 'attach-file' | 'attach-money' | 'attachment' | 'audiotrack' | 'autorenew' | 'av-timer' | 'backspace' | 'backup' | 'battery-alert' | 'battery-charging-full' | 'battery-full' | 'battery-std' | 'battery-unknown' | 'beach-access' | 'beenhere' | 'block' | 'bluetooth' | 'bluetooth-audio' | 'bluetooth-connected' | 'bluetooth-disabled' | 'bluetooth-searching' | 'blur-circular' | 'blur-linear' | 'blur-off' | 'blur-on' | 'book' | 'bookmark' | 'bookmark-border' | 'border-all' | 'border-bottom' | 'border-clear' | 'border-color' | 'border-horizontal' | 'border-inner' | 'border-left' | 'border-outer' | 'border-right' | 'border-style' | 'border-top' | 'border-vertical' | 'branding-watermark' | 'brightness-1' | 'brightness-2' | 'brightness-3' | 'brightness-4' | 'brightness-5' | 'brightness-6' | 'brightness-7' | 'brightness-auto' | 'brightness-high' | 'brightness-low' | 'brightness-medium' | 'broken-image' | 'brush' | 'bubble-chart' | 'bug-report' | 'build' | 'burst-mode' | 'business' | 'business-center' | 'cached' | 'cake' | 'call' | 'call-end' | 'call-made' | 'call-merge' | 'call-missed' | 'call-missed-outgoing' | 'call-received' | 'call-split' | 'call-to-action' | 'camera' | 'camera-alt' | 'camera-enhance' | 'camera-front' | 'camera-rear' | 'camera-roll' | 'cancel' | 'card-giftcard' | 'card-membership' | 'card-travel' | 'casino' | 'cast' | 'cast-connected' | 'center-focus-strong' | 'center-focus-weak' | 'change-history' | 'chat' | 'chat-bubble' | 'chat-bubble-outline' | 'check' | 'check-box' | 'check-box-outline-blank' | 'check-circle' | 'chevron-left' | 'chevron-right' | 'child-care' | 'child-friendly' | 'chrome-reader-mode' | 'class' | 'clear' | 'clear-all' | 'close' | 'closed-caption' | 'cloud' | 'cloud-circle' | 'cloud-done' | 'cloud-download' | 'cloud-off' | 'cloud-queue' | 'cloud-upload' | 'code' | 'collections' | 'collections-bookmark' | 'color-lens' | 'colorize' | 'comment' | 'compare' | 'compare-arrows' | 'computer' | 'confirmation-number' | 'contact-mail' | 'contact-phone' | 'contacts' | 'content-copy' | 'content-cut' | 'content-paste' | 'control-point' | 'control-point-duplicate' | 'copyright' | 'create' | 'create-new-folder' | 'credit-card' | 'crop' | 'crop-16-9' | 'crop-3-2' | 'crop-5-4' | 'crop-7-5' | 'crop-din' | 'crop-free' | 'crop-landscape' | 'crop-original' | 'crop-portrait' | 'crop-rotate' | 'crop-square' | 'dashboard' | 'data-usage' | 'date-range' | 'dehaze' | 'delete' | 'delete-forever' | 'delete-sweep' | 'description' | 'desktop-mac' | 'desktop-windows' | 'details' | 'developer-board' | 'developer-mode' | 'device-hub' | 'devices' | 'devices-other' | 'dialer-sip' | 'dialpad' | 'directions' | 'directions-bike' | 'directions-boat' | 'directions-bus' | 'directions-car' | 'directions-railway' | 'directions-run' | 'directions-subway' | 'directions-transit' | 'directions-walk' | 'disc-full' | 'dns' | 'do-not-disturb' | 'do-not-disturb-alt' | 'do-not-disturb-off' | 'do-not-disturb-on' | 'dock' | 'domain' | 'done' | 'done-all' | 'donut-large' | 'donut-small' | 'drafts' | 'drag-handle' | 'drive-eta' | 'dvr' | 'edit' | 'edit-location' | 'eject' | 'email' | 'enhanced-encryption' | 'equalizer' | 'error' | 'error-outline' | 'euro-symbol' | 'ev-station' | 'event' | 'event-available' | 'event-busy' | 'event-note' | 'event-seat' | 'exit-to-app' | 'expand-less' | 'expand-more' | 'explicit' | 'explore' | 'exposure' | 'exposure-neg-1' | 'exposure-neg-2' | 'exposure-plus-1' | 'exposure-plus-2' | 'exposure-zero' | 'extension' | 'face' | 'fast-forward' | 'fast-rewind' | 'favorite' | 'favorite-border' | 'featured-play-list' | 'featured-video' | 'feedback' | 'fiber-dvr' | 'fiber-manual-record' | 'fiber-new' | 'fiber-pin' | 'fiber-smart-record' | 'file-download' | 'file-upload' | 'filter' | 'filter-1' | 'filter-2' | 'filter-3' | 'filter-4' | 'filter-5' | 'filter-6' | 'filter-7' | 'filter-8' | 'filter-9' | 'filter-9-plus' | 'filter-b-and-w' | 'filter-center-focus' | 'filter-drama' | 'filter-frames' | 'filter-hdr' | 'filter-list' | 'filter-none' | 'filter-tilt-shift' | 'filter-vintage' | 'find-in-page' | 'find-replace' | 'fingerprint' | 'first-page' | 'fitness-center' | 'flag' | 'flare' | 'flash-auto' | 'flash-off' | 'flash-on' | 'flight' | 'flight-land' | 'flight-takeoff' | 'flip' | 'flip-to-back' | 'flip-to-front' | 'folder' | 'folder-open' | 'folder-shared' | 'folder-special' | 'font-download' | 'format-align-center' | 'format-align-justify' | 'format-align-left' | 'format-align-right' | 'format-bold' | 'format-clear' | 'format-color-fill' | 'format-color-reset' | 'format-color-text' | 'format-indent-decrease' | 'format-indent-increase' | 'format-italic' | 'format-line-spacing' | 'format-list-bulleted' | 'format-list-numbered' | 'format-paint' | 'format-quote' | 'format-shapes' | 'format-size' | 'format-strikethrough' | 'format-textdirection-l-to-r' | 'format-textdirection-r-to-l' | 'format-underlined' | 'forum' | 'forward' | 'forward-10' | 'forward-30' | 'forward-5' | 'free-breakfast' | 'fullscreen' | 'fullscreen-exit' | 'functions' | 'g-translate' | 'gamepad' | 'games' | 'gavel' | 'gesture' | 'get-app' | 'gif' | 'golf-course' | 'gps-fixed' | 'gps-not-fixed' | 'gps-off' | 'grade' | 'gradient' | 'grain' | 'graphic-eq' | 'grid-off' | 'grid-on' | 'group' | 'group-add' | 'group-work' | 'hd' | 'hdr-off' | 'hdr-on' | 'hdr-strong' | 'hdr-weak' | 'headset' | 'headset-mic' | 'healing' | 'hearing' | 'help' | 'help-outline' | 'high-quality' | 'highlight' | 'highlight-off' | 'history' | 'home' | 'hot-tub' | 'hotel' | 'hourglass-empty' | 'hourglass-full' | 'http' | 'https' | 'image' | 'image-aspect-ratio' | 'import-contacts' | 'import-export' | 'important-devices' | 'inbox' | 'indeterminate-check-box' | 'info' | 'info-outline' | 'input' | 'insert-chart' | 'insert-comment' | 'insert-drive-file' | 'insert-emoticon' | 'insert-invitation' | 'insert-link' | 'insert-photo' | 'invert-colors' | 'invert-colors-off' | 'iso' | 'keyboard' | 'keyboard-arrow-down' | 'keyboard-arrow-left' | 'keyboard-arrow-right' | 'keyboard-arrow-up' | 'keyboard-backspace' | 'keyboard-capslock' | 'keyboard-hide' | 'keyboard-return' | 'keyboard-tab' | 'keyboard-voice' | 'kitchen' | 'label' | 'label-outline' | 'landscape' | 'language' | 'laptop' | 'laptop-chromebook' | 'laptop-mac' | 'laptop-windows' | 'last-page' | 'launch' | 'layers' | 'layers-clear' | 'leak-add' | 'leak-remove' | 'lens' | 'library-add' | 'library-books' | 'library-music' | 'lightbulb-outline' | 'line-style' | 'line-weight' | 'linear-scale' | 'link' | 'linked-camera' | 'list' | 'live-help' | 'live-tv' | 'local-activity' | 'local-airport' | 'local-atm' | 'local-bar' | 'local-cafe' | 'local-car-wash' | 'local-convenience-store' | 'local-dining' | 'local-drink' | 'local-florist' | 'local-gas-station' | 'local-grocery-store' | 'local-hospital' | 'local-hotel' | 'local-laundry-service' | 'local-library' | 'local-mall' | 'local-movies' | 'local-offer' | 'local-parking' | 'local-pharmacy' | 'local-phone' | 'local-pizza' | 'local-play' | 'local-post-office' | 'local-printshop' | 'local-see' | 'local-shipping' | 'local-taxi' | 'location-city' | 'location-disabled' | 'location-off' | 'location-on' | 'location-searching' | 'lock' | 'lock-open' | 'lock-outline' | 'looks' | 'looks-3' | 'looks-4' | 'looks-5' | 'looks-6' | 'looks-one' | 'looks-two' | 'loop' | 'loupe' | 'low-priority' | 'loyalty' | 'mail' | 'mail-outline' | 'map' | 'markunread' | 'markunread-mailbox' | 'memory' | 'menu' | 'merge-type' | 'message' | 'mic' | 'mic-none' | 'mic-off' | 'mms' | 'mode-comment' | 'mode-edit' | 'monetization-on' | 'money-off' | 'monochrome-photos' | 'mood' | 'mood-bad' | 'more' | 'more-horiz' | 'more-vert' | 'motorcycle' | 'mouse' | 'move-to-inbox' | 'movie' | 'movie-creation' | 'movie-filter' | 'multiline-chart' | 'music-note' | 'music-video' | 'my-location' | 'nature' | 'nature-people' | 'navigate-before' | 'navigate-next' | 'navigation' | 'near-me' | 'network-cell' | 'network-check' | 'network-locked' | 'network-wifi' | 'new-releases' | 'next-week' | 'nfc' | 'no-encryption' | 'no-sim' | 'not-interested' | 'note' | 'note-add' | 'notifications' | 'notifications-active' | 'notifications-none' | 'notifications-off' | 'notifications-paused' | 'offline-pin' | 'ondemand-video' | 'opacity' | 'open-in-browser' | 'open-in-new' | 'open-with' | 'pages' | 'pageview' | 'palette' | 'pan-tool' | 'panorama' | 'panorama-fish-eye' | 'panorama-horizontal' | 'panorama-vertical' | 'panorama-wide-angle' | 'party-mode' | 'pause' | 'pause-circle-filled' | 'pause-circle-outline' | 'payment' | 'people' | 'people-outline' | 'perm-camera-mic' | 'perm-contact-calendar' | 'perm-data-setting' | 'perm-device-information' | 'perm-identity' | 'perm-media' | 'perm-phone-msg' | 'perm-scan-wifi' | 'person' | 'person-add' | 'person-outline' | 'person-pin' | 'person-pin-circle' | 'personal-video' | 'pets' | 'phone' | 'phone-android' | 'phone-bluetooth-speaker' | 'phone-forwarded' | 'phone-in-talk' | 'phone-iphone' | 'phone-locked' | 'phone-missed' | 'phone-paused' | 'phonelink' | 'phonelink-erase' | 'phonelink-lock' | 'phonelink-off' | 'phonelink-ring' | 'phonelink-setup' | 'photo' | 'photo-album' | 'photo-camera' | 'photo-filter' | 'photo-library' | 'photo-size-select-actual' | 'photo-size-select-large' | 'photo-size-select-small' | 'picture-as-pdf' | 'picture-in-picture' | 'picture-in-picture-alt' | 'pie-chart' | 'pie-chart-outlined' | 'pin-drop' | 'place' | 'play-arrow' | 'play-circle-filled' | 'play-circle-outline' | 'play-for-work' | 'playlist-add' | 'playlist-add-check' | 'playlist-play' | 'plus-one' | 'poll' | 'polymer' | 'pool' | 'portable-wifi-off' | 'portrait' | 'power' | 'power-input' | 'power-settings-new' | 'pregnant-woman' | 'present-to-all' | 'print' | 'priority-high' | 'public' | 'publish' | 'query-builder' | 'question-answer' | 'queue' | 'queue-music' | 'queue-play-next' | 'radio' | 'radio-button-checked' | 'radio-button-unchecked' | 'rate-review' | 'receipt' | 'recent-actors' | 'record-voice-over' | 'redeem' | 'redo' | 'refresh' | 'remove' | 'remove-circle' | 'remove-circle-outline' | 'remove-from-queue' | 'remove-red-eye' | 'remove-shopping-cart' | 'reorder' | 'repeat' | 'repeat-one' | 'replay' | 'replay-10' | 'replay-30' | 'replay-5' | 'reply' | 'reply-all' | 'report' | 'report-problem' | 'restaurant' | 'restaurant-menu' | 'restore' | 'restore-page' | 'ring-volume' | 'room' | 'room-service' | 'rotate-90-degrees-ccw' | 'rotate-left' | 'rotate-right' | 'rounded-corner' | 'router' | 'rowing' | 'rss-feed' | 'rv-hookup' | 'satellite' | 'save' | 'scanner' | 'schedule' | 'school' | 'screen-lock-landscape' | 'screen-lock-portrait' | 'screen-lock-rotation' | 'screen-rotation' | 'screen-share' | 'sd-card' | 'sd-storage' | 'search' | 'security' | 'select-all' | 'send' | 'sentiment-dissatisfied' | 'sentiment-neutral' | 'sentiment-satisfied' | 'sentiment-very-dissatisfied' | 'sentiment-very-satisfied' | 'settings' | 'settings-applications' | 'settings-backup-restore' | 'settings-bluetooth' | 'settings-brightness' | 'settings-cell' | 'settings-ethernet' | 'settings-input-antenna' | 'settings-input-component' | 'settings-input-composite' | 'settings-input-hdmi' | 'settings-input-svideo' | 'settings-overscan' | 'settings-phone' | 'settings-power' | 'settings-remote' | 'settings-system-daydream' | 'settings-voice' | 'share' | 'shop' | 'shop-two' | 'shopping-basket' | 'shopping-cart' | 'short-text' | 'show-chart' | 'shuffle' | 'signal-cellular-4-bar' | 'signal-cellular-connected-no-internet-4-bar' | 'signal-cellular-no-sim' | 'signal-cellular-null' | 'signal-cellular-off' | 'signal-wifi-4-bar' | 'signal-wifi-4-bar-lock' | 'signal-wifi-off' | 'sim-card' | 'sim-card-alert' | 'skip-next' | 'skip-previous' | 'slideshow' | 'slow-motion-video' | 'smartphone' | 'smoke-free' | 'smoking-rooms' | 'sms' | 'sms-failed' | 'snooze' | 'sort' | 'sort-by-alpha' | 'spa' | 'space-bar' | 'speaker' | 'speaker-group' | 'speaker-notes' | 'speaker-notes-off' | 'speaker-phone' | 'spellcheck' | 'star' | 'star-border' | 'star-half' | 'stars' | 'stay-current-landscape' | 'stay-current-portrait' | 'stay-primary-landscape' | 'stay-primary-portrait' | 'stop' | 'stop-screen-share' | 'storage' | 'store' | 'store-mall-directory' | 'straighten' | 'streetview' | 'strikethrough-s' | 'style' | 'subdirectory-arrow-left' | 'subdirectory-arrow-right' | 'subject' | 'subscriptions' | 'subtitles' | 'subway' | 'supervisor-account' | 'surround-sound' | 'swap-calls' | 'swap-horiz' | 'swap-vert' | 'swap-vertical-circle' | 'switch-camera' | 'switch-video' | 'sync' | 'sync-disabled' | 'sync-problem' | 'system-update' | 'system-update-alt' | 'tab' | 'tab-unselected' | 'tablet' | 'tablet-android' | 'tablet-mac' | 'tag-faces' | 'tap-and-play' | 'terrain' | 'text-fields' | 'text-format' | 'textsms' | 'texture' | 'theaters' | 'thumb-down' | 'thumb-up' | 'thumbs-up-down' | 'time-to-leave' | 'timelapse' | 'timeline' | 'timer' | 'timer-10' | 'timer-3' | 'timer-off' | 'title' | 'toc' | 'today' | 'toll' | 'tonality' | 'touch-app' | 'toys' | 'track-changes' | 'traffic' | 'train' | 'tram' | 'transfer-within-a-station' | 'transform' | 'translate' | 'trending-down' | 'trending-flat' | 'trending-up' | 'tune' | 'turned-in' | 'turned-in-not' | 'tv' | 'unarchive' | 'undo' | 'unfold-less' | 'unfold-more' | 'update' | 'usb' | 'verified-user' | 'vertical-align-bottom' | 'vertical-align-center' | 'vertical-align-top' | 'vibration' | 'video-call' | 'video-label' | 'video-library' | 'videocam' | 'videocam-off' | 'videogame-asset' | 'view-agenda' | 'view-array' | 'view-carousel' | 'view-column' | 'view-comfy' | 'view-compact' | 'view-day' | 'view-headline' | 'view-list' | 'view-module' | 'view-quilt' | 'view-stream' | 'view-week' | 'vignette' | 'visibility' | 'visibility-off' | 'voice-chat' | 'voicemail' | 'volume-down' | 'volume-mute' | 'volume-off' | 'volume-up' | 'vpn-key' | 'vpn-lock' | 'wallpaper' | 'warning' | 'watch' | 'watch-later' | 'wb-auto' | 'wb-cloudy' | 'wb-incandescent' | 'wb-iridescent' | 'wb-sunny' | 'wc' | 'web' | 'web-asset' | 'weekend' | 'whatshot' | 'widgets' | 'wifi' | 'wifi-lock' | 'wifi-tethering' | 'work' | 'wrap-text' | 'youtube-searched-for' | 'zoom-in' | 'zoom-out' | 'zoom-out-map' + } + + interface OcticonsProps extends BaseIconProps { + name: 'alert' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-small-down' | 'arrow-small-left' | 'arrow-small-right' | 'arrow-small-up' | 'arrow-up' | 'beaker' | 'bell' | 'bold' | 'book' | 'bookmark' | 'briefcase' | 'broadcast' | 'browser' | 'bug' | 'calendar' | 'check' | 'checklist' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-slash' | 'circuit-board' | 'clippy' | 'clock' | 'cloud-download' | 'cloud-upload' | 'code' | 'comment' | 'comment-discussion' | 'credit-card' | 'dash' | 'dashboard' | 'database' | 'desktop-download' | 'device-camera' | 'device-camera-video' | 'device-desktop' | 'device-mobile' | 'diff' | 'diff-added' | 'diff-ignored' | 'diff-modified' | 'diff-removed' | 'diff-renamed' | 'ellipsis' | 'eye' | 'file' | 'file-binary' | 'file-code' | 'file-directory' | 'file-media' | 'file-pdf' | 'file-submodule' | 'file-symlink-directory' | 'file-symlink-file' | 'file-text' | 'file-zip' | 'flame' | 'fold' | 'gear' | 'gift' | 'gist' | 'gist-secret' | 'git-branch' | 'git-commit' | 'git-compare' | 'git-merge' | 'git-pull-request' | 'globe' | 'grabber' | 'graph' | 'heart' | 'history' | 'home' | 'horizontal-rule' | 'hubot' | 'inbox' | 'info' | 'issue-closed' | 'issue-opened' | 'issue-reopened' | 'italic' | 'jersey' | 'kebab-horizontal' | 'kebab-vertical' | 'key' | 'keyboard' | 'law' | 'light-bulb' | 'link' | 'link-external' | 'list-ordered' | 'list-unordered' | 'location' | 'lock' | 'logo-gist' | 'logo-github' | 'mail' | 'mail-read' | 'mail-reply' | 'mark-github' | 'markdown' | 'megaphone' | 'mention' | 'milestone' | 'mirror' | 'mortar-board' | 'mute' | 'no-newline' | 'note' | 'octoface' | 'organization' | 'package' | 'paintcan' | 'pencil' | 'person' | 'pin' | 'plug' | 'plus' | 'plus-small' | 'primitive-dot' | 'primitive-square' | 'project' | 'pulse' | 'question' | 'quote' | 'radio-tower' | 'reply' | 'repo' | 'repo-clone' | 'repo-force-push' | 'repo-forked' | 'repo-pull' | 'repo-push' | 'rocket' | 'rss' | 'ruby' | 'screen-full' | 'screen-normal' | 'search' | 'server' | 'settings' | 'shield' | 'sign-in' | 'sign-out' | 'smiley' | 'squirrel' | 'star' | 'stop' | 'sync' | 'tag' | 'tasklist' | 'telescope' | 'terminal' | 'text-size' | 'three-bars' | 'thumbsdown' | 'thumbsup' | 'tools' | 'trashcan' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'unfold' | 'unmute' | 'unverified' | 'verified' | 'versions' | 'watch' | 'x' | 'zap' + } + + interface SimpleLineIconsProps extends BaseIconProps { + name: 'user' | 'people' | 'user-female' | 'user-follow' | 'user-following' | 'user-unfollow' | 'login' | 'logout' | 'emotsmile' | 'phone' | 'call-end' | 'call-in' | 'call-out' | 'map' | 'location-pin' | 'direction' | 'directions' | 'compass' | 'layers' | 'menu' | 'list' | 'options-vertical' | 'options' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-circle' | 'arrow-left-circle' | 'arrow-right-circle' | 'arrow-down-circle' | 'check' | 'clock' | 'plus' | 'minus' | 'close' | 'event' | 'exclamation' | 'organization' | 'trophy' | 'screen-smartphone' | 'screen-desktop' | 'plane' | 'notebook' | 'mustache' | 'mouse' | 'magnet' | 'energy' | 'disc' | 'cursor' | 'cursor-move' | 'crop' | 'chemistry' | 'speedometer' | 'shield' | 'screen-tablet' | 'magic-wand' | 'hourglass' | 'graduation' | 'ghost' | 'game-controller' | 'fire' | 'eyeglass' | 'envelope-open' | 'envelope-letter' | 'bell' | 'badge' | 'anchor' | 'wallet' | 'vector' | 'speech' | 'puzzle' | 'printer' | 'present' | 'playlist' | 'pin' | 'picture' | 'handbag' | 'globe-alt' | 'globe' | 'folder-alt' | 'folder' | 'film' | 'feed' | 'drop' | 'drawer' | 'docs' | 'doc' | 'diamond' | 'cup' | 'calculator' | 'bubbles' | 'briefcase' | 'book-open' | 'basket-loaded' | 'basket' | 'bag' | 'action-undo' | 'action-redo' | 'wrench' | 'umbrella' | 'trash' | 'tag' | 'support' | 'frame' | 'size-fullscreen' | 'size-actual' | 'shuffle' | 'share-alt' | 'share' | 'rocket' | 'question' | 'pie-chart' | 'pencil' | 'note' | 'loop' | 'home' | 'grid' | 'graph' | 'microphone' | 'music-tone-alt' | 'music-tone' | 'earphones-alt' | 'earphones' | 'equalizer' | 'like' | 'dislike' | 'control-start' | 'control-rewind' | 'control-play' | 'control-pause' | 'control-forward' | 'control-end' | 'volume-1' | 'volume-2' | 'volume-off' | 'calendar' | 'bulb' | 'chart' | 'ban' | 'bubble' | 'camrecorder' | 'camera' | 'cloud-download' | 'cloud-upload' | 'envelope' | 'eye' | 'flag' | 'heart' | 'info' | 'key' | 'link' | 'lock' | 'lock-open' | 'magnifier' | 'magnifier-add' | 'magnifier-remove' | 'paper-clip' | 'paper-plane' | 'power' | 'refresh' | 'reload' | 'settings' | 'star' | 'symbol-female' | 'symbol-male' | 'target' | 'credit-card' | 'paypal' | 'social-tumblr' | 'social-twitter' | 'social-facebook' | 'social-instagram' | 'social-linkedin' | 'social-pinterest' | 'social-github' | 'social-google' | 'social-reddit' | 'social-skype' | 'social-dribbble' | 'social-behance' | 'social-foursqare' | 'social-soundcloud' | 'social-spotify' | 'social-stumbleupon' | 'social-youtube' | 'social-dropbox' | 'social-vkontakte' | 'social-steam' + } + + interface ZocialProps extends BaseIconProps { + name: 'acrobat' | 'amazon' | 'android' | 'angellist' | 'aol' | 'appnet' | 'appstore' | 'bitbucket' | 'bitcoin' | 'blogger' | 'buffer' | 'cal' | 'call' | 'cart' | 'chrome' | 'cloudapp' | 'creativecommons' | 'delicious' | 'digg' | 'disqus' | 'dribbble' | 'dropbox' | 'drupal' | 'dwolla' | 'email' | 'eventasaurus' | 'eventbrite' | 'eventful' | 'evernote' | 'facebook' | 'fivehundredpx' | 'flattr' | 'flickr' | 'forrst' | 'foursquare' | 'github' | 'gmail' | 'google' | 'googleplay' | 'googleplus' | 'gowalla' | 'grooveshark' | 'guest' | 'html5' | 'ie' | 'instagram' | 'instapaper' | 'intensedebate' | 'itunes' | 'klout' | 'lanyrd' | 'lastfm' | 'lego' | 'linkedin' | 'lkdto' | 'logmein' | 'macstore' | 'meetup' | 'myspace' | 'ninetyninedesigns' | 'openid' | 'opentable' | 'paypal' | 'persona' | 'pinboard' | 'pinterest' | 'plancast' | 'plurk' | 'pocket' | 'podcast' | 'posterous' | 'print' | 'quora' | 'reddit' | 'rss' | 'scribd' | 'skype' | 'smashing' | 'songkick' | 'soundcloud' | 'spotify' | 'stackoverflow' | 'statusnet' | 'steam' | 'stripe' | 'stumbleupon' | 'tumblr' | 'twitter' | 'viadeo' | 'vimeo' | 'vk' | 'weibo' | 'wikipedia' | 'windows' | 'wordpress' | 'xing' | 'yahoo' | 'ycombinator' | 'yelp' | 'youtube' + } + + abstract class BaseIconsComponent extends Component { + static Button: any + static font: any + static glyphMap: any + } + + class Entypo extends BaseIconsComponent { } + class EvilIcons extends BaseIconsComponent { } + class Feather extends BaseIconsComponent { } + class FontAwesome extends BaseIconsComponent { } + class Foundation extends BaseIconsComponent { } + class Ionicons extends BaseIconsComponent { } + class MaterialCommunityIcons extends BaseIconsComponent { } + class MaterialIcons extends BaseIconsComponent { } + class Octicons extends BaseIconsComponent { } + class SimpleLineIcons extends BaseIconsComponent { } + class Zocial extends BaseIconsComponent { } +} From 9de4ff173546122f8f9438b5efb86c4c67e5393b Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Tue, 23 Jan 2018 21:21:57 +0100 Subject: [PATCH 20/52] Revert "Update Audio, AV and Video" This reverts commit a36d4ccc2ea02cb8fd336db43fe5d879368d9d53. --- types/expo/index.d.ts | 928 +++++++++++++++--------------------------- 1 file changed, 337 insertions(+), 591 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 35e95710bd..c728d8bc63 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -174,110 +174,6 @@ export class Asset { * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. */ export namespace Audio { - type PlaybackSource = AV.PlaybackSource; - type PlaybackStatus = AV.PlaybackStatus; - type PlaybackStatusToSet = AV.PlaybackStatusToSet; - - type RecordingOptions = { - android: { - extension: string, - outputFormat: number, - audioEncoder: number, - sampleRate?: number, - numberOfChannels?: number, - bitRate?: number, - maxFileSize?: number - }, - ios: { - extension: string, - outputFormat?: string | number, - audioQuality: number, - sampleRate: number, - numberOfChannels: number, - bitRate: number, - bitRateStrategy?: number, - bitDepthHint?: number, - linearPCMBitDepth?: number, - linearPCMIsBigEndian?: boolean, - linearPCMIsFloat?: boolean - } - }; - - enum RecordingOptionsAndroidOutputFormat { - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT = 0, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP = 1, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4 = 2, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB = 3, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB = 4, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF = 5, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS = 6, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP = 7, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS = 8, - RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM = 9 - } - - enum RecordingOptionAndroidAudioEncoder { - RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT = 0, - RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB = 1, - RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB = 2, - RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC = 3, - RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC = 4, - RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD = 5, - RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS = 6 - } - - enum RecordingOptionIosOutputFormat { - RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM = 'lpcm', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3 = 'ac-3', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3 = 'cac3', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4 = 'ima4', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC = 'aac ', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP = 'celp', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC = 'hvxc', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ = 'twvq', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3 = 'MAC3', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6 = 'MAC6', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW = 'ulaw', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW = 'alaw', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN = 'QDMC', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2 = 'QDM2', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM = 'Qclp', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1 = '.mp1', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2 = '.mp2', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3 = '.mp3', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS = 'alac', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE = 'aach', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD = 'aacl', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD = 'aace', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR = 'aacf', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2 = 'aacg', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2 = 'aacp', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL = 'aacs', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR = 'samr', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB = 'sawb', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE = 'AUDB', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC = 'ilbc', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA = 0x6d730011, - RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM = 0x6d730031, - RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3 = 'aes3', - RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3 = 'ec-3' - } - - enum RecordingOptionIosAudioQuality { - RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN = 0, - RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW = 0x20, - RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM = 0x40, - RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH = 0x60, - RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX = 0x7f - } - - enum RecodingOptionIosBitRateStratety { - RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT = 0, - RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE = 1, - RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED = 2, - RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE = 3 - } - enum InterruptionModeIos { /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, @@ -289,6 +185,10 @@ export namespace Audio { INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 } + const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; + const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; + enum InterruptionModeAndroid { /** If this option is set, your experience’s audio interrupts audio from other apps. */ INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, @@ -297,14 +197,78 @@ export namespace Audio { INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 } - const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; - const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; + const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; - type RecordingStatus = - { - canRecord: false, - isDoneRecording: false - } | { + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; + + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; + + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; + + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; + + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; + + type RecordingStatus = { + canRecord: false, + isDoneRecording: false + } | { canRecord: true, isRecording: boolean, durationMillis: number @@ -314,40 +278,58 @@ export namespace Audio { durationMillis: number }; - /** - * Note that these are the only legal `AudioMode` combinations of (`playsInSilentModeIOS`, `allowsRecordingIOS`, `interruptionModeIOS`), and any other will result in promise rejection: - * - * - `false`, `false`, `INTERRUPTION_MODE_IOS_DO_NOT_MIX` - * - `false`, `false`, `INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS` - * - `true`, `true`, `INTERRUPTION_MODE_IOS_DO_NOT_MIX` - * - `true`, `true`, `INTERRUPTION_MODE_IOS_DUCK_OTHERS` - * - `true`, `true`, `INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS` - * - `true`, `false`, `INTERRUPTION_MODE_IOS_DO_NOT_MIX` - * - `true`, `false`, `INTERRUPTION_MODE_IOS_DUCK_OTHERS` - * - `true`, `false`, `INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS` - */ + const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; + const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; + + interface RecordingOptions { + android: { + extension: string; + outputFormat: number; + audioEncoder: number; + sampleRate?: number; + numberOfChannels?: number; + bitRate?: number; + maxFileSize?: number; + }; + ios: { + extension: string; + outputFormat?: string | number; + audioQuality: number; + sampleRate: number; + numberOfChannels: number; + bitRate: number; + bitRateStrategy?: number; + bitDepthHint?: number; + linearPCMBitDepth?: number; + linearPCMIsBigEndian?: boolean; + linearPCMIsFloat?: boolean; + }; + } + interface AudioMode { + /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ + playsInSilentModeIOS: boolean; + /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ allowsRecordingIOS: boolean; /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ interruptionModeIOS: InterruptionModeIos; - /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ - playsInSilentLockedModeIOS: boolean; + /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ + shouldDuckAndroid: boolean; /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ interruptionModeAndroid: InterruptionModeAndroid; - - /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ - shouldDuckAndroid: boolean; } function setIsEnabledAsync(value: boolean): Promise; function setAudioModeAsync(mode: AudioMode): Promise; /** This class represents a sound corresponding to an Asset or URL. */ - class Sound { + class Sound extends PlaybackObject { + constructor(); + /** * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. * @@ -369,150 +351,16 @@ export namespace Audio { initialStatus?: PlaybackStatusToSet, /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ - onPlaybackStatusUpdate?: ((status?: PlaybackStatus) => void) | null, + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ downloadFirst?: boolean - ): Promise<{ sound: Sound, status: PlaybackStatus }> - - // Methods below are shared with the Video class. The code is duplicated here in expo.d.ts because I couldn't figure a way to share it. - - /** - * Gets the `PlaybackStatus` of the `playbackObject`. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. - */ - getStatusAsync(): Promise; - - /** - * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. - */ - loadAsync( - /** - * The source of the media. The following forms are supported: - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. - * - `require('path/to/file')` for a media file asset in the source code directory. - * - An `Expo.Asset object` for a media file asset. - */ - source: PlaybackSource, - - /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ - initialStatus?: PlaybackStatusToSet, - - /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ - downloadFirst?: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ - pauseAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. - */ - playAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. - */ - playFromPositionAsync( - /** The desired position of playback in milliseconds. */ - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** - * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. - */ - replayAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ - setIsLoopingAsync( - /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ - isLooping: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ - setIsMutedAsync( - /** A boolean describing if the audio of this media should be muted. */ - isMuted: boolean - ): Promise; - - /** - * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. - * - * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. - */ - setOnPlaybackStatusUpdate( - /** A function taking a single parameter `PlaybackStatus`. */ - onPlaybackStatusUpdate?: (status: PlaybackStatus) => void - ): void; - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ - setPositionAsync( - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ - setProgressUpdateIntervalAsync( - /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ - progressUpdateIntervalMillis: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ - setRateAsync( - /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ - rate: number, - - /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ - shouldCorrectPitch: boolean - ): Promise; - - /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ - setStatusAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ - setVolumeAsync( - /** A number between `0.0` (silence) and `1.0` (maximum volume). */ - volume: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ - stopAsync(): Promise; - - /** - * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. - */ - unloadAsync(): Promise; + ): Promise<{ sound: Sound, status: PlaybackStatus }>; } class Recording { + constructor(); + /** Gets the `status` of the `Recording`. */ getStatusAsync(): Promise; @@ -588,54 +436,189 @@ export namespace AuthSession { function getRedirectUrl(): string; } -declare namespace AV { - type PlaybackSource = number | { uri: string } | Asset; +// #region AV +/** + * AV + */ +export type PlaybackStatus = + { + isLoaded: false; + androidImplementation?: string; - type PlaybackStatus = - { - isLoaded: false, - androidImplementation?: string, + /** Populated exactly once when an error forces the object to unload. */ + error?: string; + } | { + isLoaded: true; + androidImplementation?: string; + uri: string; + progressUpdateIntervalMillis: number; + durationMillis?: number; + positionMillis: number; + playableDurationMillis?: number; + shouldPlay: boolean; + isPlaying: boolean; + isBuffering: boolean; + rate: number; + shouldCorrectPitch: boolean; + volume: number; + isMuted: boolean; + isLooping: boolean; - /** Populated exactly once when an error forces the object to unload. */ - error?: string - } | { - isLoaded: true, - androidImplementation?: string, - - uri: string, - - progressUpdateIntervalMillis: number, - durationMillis?: number, - positionMillis: number, - playableDurationMillis?: number, - - shouldPlay: boolean, - isPlaying: boolean, - isBuffering: boolean, - - rate: number, - shouldCorrectPitch: boolean, - volume: number, - isMuted: boolean, - isLooping: boolean, - - /** True exactly once when the track plays to finish. */ - didJustFinish: boolean - }; - - type PlaybackStatusToSet = { - androidImplementation?: string, - progressUpdateIntervalMillis?: number, - positionMillis?: number, - shouldPlay?: boolean, - rate?: number, - shouldCorrectPitch?: boolean, - volume?: number, - isMuted?: boolean, - isLooping?: boolean + /** True exactly once when the track plays to finish. */ + didJustFinish: boolean; }; + +export interface PlaybackStatusToSet { + androidImplementation?: string; + progressUpdateIntervalMillis?: number; + positionMillis?: number; + shouldPlay?: boolean; + rate?: FloatFromZeroToOne; + shouldCorrectPitch?: boolean; + volume?: FloatFromZeroToOne; + isMuted?: boolean; + isLooping?: boolean; } +export type PlaybackSource = RequireSource | { uri: string } | Asset; + +export class PlaybackObject { + /** + * Gets the `PlaybackStatus` of the `playbackObject`. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. + */ + getStatusAsync(): Promise; + + /** + * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. + */ + loadAsync( + /** + * The source of the media. The following forms are supported: + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. + * - `require('path/to/file')` for a media file asset in the source code directory. + * - An `Expo.Asset object` for a media file asset. + */ + source: PlaybackSource, + + /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ + initialStatus?: PlaybackStatusToSet, + + /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ + downloadFirst?: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ + pauseAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. + */ + playAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. + */ + playFromPositionAsync( + /** The desired position of playback in milliseconds. */ + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** + * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. + */ + replayAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ + setIsLoopingAsync( + /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ + isLooping: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ + setIsMutedAsync( + /** A boolean describing if the audio of this media should be muted. */ + isMuted: boolean + ): Promise; + + /** + * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. + * + * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. + */ + setOnPlaybackStatusUpdate( + /** A function taking a single parameter `PlaybackStatus`. */ + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void + ): void; + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ + setPositionAsync( + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ + setProgressUpdateIntervalAsync( + /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ + progressUpdateIntervalMillis: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ + setRateAsync( + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate: number, + + /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ + shouldCorrectPitch: boolean + ): Promise; + + /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ + setStatusAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ + setVolumeAsync( + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ + stopAsync(): Promise; + + /** + * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. + */ + unloadAsync(): Promise; +} +// #endregion + // #region BarCodeScanner /** * BarCodeScanner @@ -1981,319 +1964,82 @@ export namespace Util { }) => void): { remove(): void; }; } -declare namespace Video { - type PlaybackSource = AV.PlaybackSource; - type PlaybackStatus = AV.PlaybackStatus; - type PlaybackStatusToSet = AV.PlaybackStatusToSet; - - type FullscreenUpdateEvent = { - fullscreenUpdate: 0 | 1 | 2 | 3, - status: AV.PlaybackStatus - }; - - type NaturalSize = { - width: number, - height: number, - orientation: 'portrait' | 'landscape' - }; - - type ReadyForDisplayEvent = { - naturalSize: NaturalSize, - status: AV.PlaybackStatus - }; - - type ResizeMode = 'contain' | 'cover' | 'stretch'; +// #region Video +/** + * Expo Video + */ +export interface NaturalSize { + width: number; + height: number; + orientation: Orientation; } -interface VideoLoad { - duration: number; - currentTime: number; - canPlayReverse: boolean; - canPlayFastForward: boolean; - canPlaySlowForward: boolean; - canPlaySlowReverse: boolean; - canStepBackward: boolean; - canStepForward: boolean; - naturalSize: Video.NaturalSize; +export interface ReadyForDisplayEvent { + naturalSize: NaturalSize; + status: PlaybackStatus; } -type VideoError = - { - code: any, - domain: any - } | { - what: any, - extra: any - }; - -interface VideoProgress { - currentTime: number; - playableDuration: number; +export enum FullscreenUpdateVariants { + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 } -interface VideoSeek { - currentTime: number; - seekTime: number; +export interface FullscreenUpdateEvent { + fullscreenUpdate: FullscreenUpdateVariants; + status: PlaybackStatus; } -/** See the AV documentation for more information. https://docs.expo.io/versions/latest/sdk/av.html */ -interface VideoProps { - // Source stuff - /** - * The source of the video data to display. If this prop is null, or left blank, the video component will display nothing. - * - * Note that this can also be set on the ref via loadAsync(); see below or the AV documentation for further information. - * - * The following forms for the source are supported: - * - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a video file on the web. - * - `require('path/to/file')` for a video file asset in the source code directory. - * - An `Expo.Asset` object for a video file asset. - */ - source?: AV.PlaybackSource; +export interface VideoProps { + source?: PlaybackSource | null; + posterSource?: URISource | RequireSource; - /** - * The source of an optional image to display over the video while it is loading. The following forms are supported: - * - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a image file on the web. - * - `require('path/to/file')` for an image file asset in the source code directory. - */ - posterSource?: { uri: string } | number; + resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; + useNativeControls?: boolean; + usePoster?: boolean; - // Callbacks - /** A function to be called regularly with the PlaybackStatus of the video. You will likely be using this a lot. */ - onPlaybackStatusUpdate?: (status: AV.PlaybackStatus) => void; + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; + onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; + onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; - /** A function to be called when the video begins to be loaded into memory. Called without any arguments. */ onLoadStart?: () => void; - - /** A function to be called once the video has been loaded. The data is streamed so all of it may not have been fetched yet, just enough to render the first frame. The function is called with the `PlaybackStatus` of the video as its parameter. */ - onLoad?: (status: AV.PlaybackStatus) => void; - - /** A function to be called if load or playback have encountered a fatal error. The function is passed a single error message string as a parameter. Errors sent here are also set on `playbackStatus.error` that are passed into the `onPlaybackStatusUpdate` callback. */ + onLoad?: (status: PlaybackStatus) => void; onError?: (error: string) => void; - /** - * A function to be called when the video is ready for display. Note that this function gets called whenever the video’s natural size changes. The function is passed a dictionary with the following key-value pairs: - * - * - `naturalSize`: a dictionary with the following key-value pairs: - * - `width`: a number describing the width in pixels of the video data. - * - `height`: a number describing the height in pixels of the video data. - * - `orientation`: a string describing the natural orientation of the video data, either 'portrait' or 'landscape'. - * - `status`: the PlaybackStatus of the video; see the AV documentation for further information. - */ - onReadyForDisplay?: (event: Video.ReadyForDisplayEvent) => void; - - /** - * A function to be called when the state of the native iOS fullscreen view changes (controlled via the presentIOSFullscreenPlayer() and dismissIOSFullscreenPlayer() methods on the Video’s ref). The function is passed a dictionary with the following key-value pairs: - * - * - `fullscreenUpdate`: a number taking one of the following values: - * - `Expo.Video.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT`: describing that the fullscreen player is about to present. - * - `Expo.Video.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT`: describing that the fullscreen player just finished presenting. - * - `Expo.Video.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS`: describing that the fullscreen player is about to dismiss. - * - `Expo.Video.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS`: describing that the fullscreen player just finished dismissing. - * - `status`: the PlaybackStatus of the video; see the AV documentation for further information. - */ - onIOSFullscreenUpdate?: (event: Video.FullscreenUpdateEvent) => void; - - // UI stuff - /** A boolean which, if set to true, will display native playback controls (such as play and pause) within the Video component. If you’d prefer to use custom controls, you can write them yourself, and/or check out the Videoplayer component. https://github.com/expo/videoplayer */ - useNativeControls?: boolean; - - /** - * A string describing how the video should be scaled for display in the component view bounds. Must be one of the following values: - * - * - `Expo.Video.RESIZE_MODE_STRETCH` - Stretch to fill component bounds. - * - `Expo.Video.RESIZE_MODE_CONTAIN` - Fit within component bounds while preserving aspect ratio. - * - `Expo.Video.RESIZE_MODE_COVER` - Fill component bounds while preserving aspect ratio. - */ - resizeMode?: Video.ResizeMode - - /** A boolean which, if set to true, will display an image (whose source is set via the prop posterSource) while the video is loading. */ - usePoster?: boolean - - // Playback API - /** A dictionary setting a new `PlaybackStatusToSet` on the video. */ - status?: AV.PlaybackStatusToSet; + status?: PlaybackStatusToSet; progressUpdateIntervalMillis?: number; - - /** The desired position of playback in milliseconds. */ positionMillis?: number; - - /** A boolean describing if the media is supposed to play. Playback may not start immediately after setting this value for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. */ shouldPlay?: boolean; - - /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ rate?: number; - - /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ shouldCorrectPitch?: boolean; volume?: number; - - /** A boolean describing if the audio of this media should be muted. */ isMuted?: boolean; - - /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ isLooping?: boolean; - // Required by react-native scaleX?: number; scaleY?: number; translateX?: number; translateY?: number; rotation?: number; + ref?: Ref; } -declare class Video extends Component { - static RESIZE_MODE_CONTAIN: string; - static RESIZE_MODE_COVER: string; - static RESIZE_MODE_STRETCH: string; - - seek(time: string): void; - - /** (iOS only) This presents a fullscreen view of your video component on top of your app’s UI. Note that even if `useNativeControls` is set to `false`, native controls will be visible in fullscreen mode. Implementing a custom fullscreen mode is necessary if you want fullscreen on Android and/or with custom controls overlayed. */ - presentFullscreenPlayer(): Promise; - - /** (iOS only) This dismisses the fullscreen video view. */ - dismissFullscreenPlayer(): Promise; - - // Methods below are shared with the Sound class. The code is duplicated here in expo.d.ts because I couldn't figure a way to share it. - - /** - * Gets the `PlaybackStatus` of the `playbackObject`. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. - */ - getStatusAsync(): Promise; - - /** - * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. - */ - loadAsync( - /** - * The source of the media. The following forms are supported: - * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. - * - `require('path/to/file')` for a media file asset in the source code directory. - * - An `Expo.Asset object` for a media file asset. - */ - source: AV.PlaybackSource, - - /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ - initialStatus?: AV.PlaybackStatusToSet, - - /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ - downloadFirst?: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ - pauseAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. - */ - playAsync(): Promise; - - /** - * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. - * - * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. - */ - playFromPositionAsync( - /** The desired position of playback in milliseconds. */ - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** - * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. - */ - replayAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: AV.PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ - setIsLoopingAsync( - /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ - isLooping: boolean - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ - setIsMutedAsync( - /** A boolean describing if the audio of this media should be muted. */ - isMuted: boolean - ): Promise; - - /** - * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. - * - * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. - */ - setOnPlaybackStatusUpdate( - /** A function taking a single parameter `PlaybackStatus`. */ - onPlaybackStatusUpdate?: (status: AV.PlaybackStatus) => void - ): void; - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ - setPositionAsync( - positionMillis: number, - - /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ - tolerances?: { - toleranceMillisBefore: number, - toleranceMillisAfter: number - } - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ - setProgressUpdateIntervalAsync( - /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ - progressUpdateIntervalMillis: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ - setRateAsync( - /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ - rate: number, - - /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ - shouldCorrectPitch: boolean - ): Promise; - - /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ - setStatusAsync( - /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ - status: AV.PlaybackStatusToSet - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ - setVolumeAsync( - /** A number between `0.0` (silence) and `1.0` (maximum volume). */ - volume: number - ): Promise; - - /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ - stopAsync(): Promise; - - /** - * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. - * - * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. - */ - unloadAsync(): Promise; +export interface VideoState { + showPoster: boolean; } +export class Video extends Component { + static RESIZE_MODE_CONTAIN: ResizeModeContain; + static RESIZE_MODE_COVER: ResizeModeCover; + static RESIZE_MODE_STRETCH: ResizeModeStretch; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; +} +// #endregion + /** * Web Browser */ From d6f4e2076d5fd03d444a9fd0400a8b22f68c859b Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Tue, 23 Jan 2018 21:23:30 +0100 Subject: [PATCH 21/52] export namespace => declare namespace --- types/expo/index.d.ts | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index c728d8bc63..b3f5f15f70 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -60,7 +60,7 @@ declare namespace Accelerometer { * * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. */ -export namespace Amplitude { +declare namespace Amplitude { /** Initializes Amplitude with your Amplitude API key. */ function initialize(apiKey: string): void; @@ -173,7 +173,7 @@ export class Asset { * * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. */ -export namespace Audio { +declare namespace Audio { enum InterruptionModeIos { /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, @@ -416,7 +416,7 @@ export namespace Audio { /** * AuthSession */ -export namespace AuthSession { +declare namespace AuthSession { function startAsync(options: { authUrl: string; returnUrl?: string; }): Promise< { type: 'cancel'; @@ -647,7 +647,7 @@ export class BlurView extends Component { } /** * Brightness */ -export namespace Brightness { +declare namespace Brightness { function setBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; function getBrightnessAsync(): Promise; function getSystemBrightnessAsync(): Promise; @@ -709,7 +709,7 @@ export class Camera extends Component { /** * Constants */ -export namespace Constants { +declare namespace Constants { const appOwnership: 'expo' | 'standalone' | 'guest'; const expoVersion: string; const deviceId: string; @@ -827,7 +827,7 @@ export namespace Constants { /** * Contacts */ -export namespace Contacts { +declare namespace Contacts { type PhoneNumbers = 'phoneNumbers'; type Emails = 'emails'; type Addresses = 'addresses'; @@ -977,7 +977,7 @@ export namespace Contacts { /** * DocumentPicker */ -export namespace DocumentPicker { +declare namespace DocumentPicker { interface Options { type?: string; } @@ -996,14 +996,14 @@ export namespace DocumentPicker { /** * ErrorRecovery */ -export namespace ErrorRecovery { +declare namespace ErrorRecovery { function setRecoveryProps(props: HashMap): void; } /** * Facebook */ -export namespace Facebook { +declare namespace Facebook { interface Options { permissions?: string[]; behavior?: 'web' | 'native' | 'browser' | 'system'; @@ -1021,7 +1021,7 @@ export namespace Facebook { /** * Facebook Ads */ -export namespace FacebookAds { +declare namespace FacebookAds { /** * Interstitial Ads */ @@ -1081,7 +1081,7 @@ export namespace FacebookAds { /** * FaceDetector */ -export namespace FaceDetector { +declare namespace FaceDetector { interface Point { x: Axis; y: Axis; @@ -1150,7 +1150,7 @@ export namespace FaceDetector { /** * FileSystem */ -export namespace FileSystem { +declare namespace FileSystem { type FileInfo = { exists: true; isDirectory: boolean; @@ -1226,7 +1226,7 @@ export namespace FileSystem { } /** Use TouchID/FaceID (iOS) or the Fingerprint API (Android) to authenticate the user with a fingerprint scan. */ -export namespace Fingerprint { +declare namespace Fingerprint { type FingerprintAuthenticationResult = { success: true } | { @@ -1256,7 +1256,7 @@ export namespace Fingerprint { /** * Font */ -export namespace Font { +declare namespace Font { interface FontMap { [name: string]: RequireSource; } @@ -1279,7 +1279,7 @@ export class GLView extends Component { } /** * Google */ -export namespace Google { +declare namespace Google { interface LogInConfig { androidClientId?: string; androidStandaloneAppClientId?: string; @@ -1312,7 +1312,7 @@ export namespace Google { } /** Access the device gyroscope sensor to respond to changes in rotation in 3d space. */ -export namespace Gyroscope { +declare namespace Gyroscope { interface GyroscopeObject { x: Axis; y: Axis; @@ -1332,7 +1332,7 @@ export namespace Gyroscope { /** * ImageManipulator */ -export namespace ImageManipulator { +declare namespace ImageManipulator { interface ImageResult { uri: string; width: number; @@ -1362,7 +1362,7 @@ export namespace ImageManipulator { /** * Image Picker */ -export namespace ImagePicker { +declare namespace ImagePicker { interface ImageInfo { uri: string; width: number; @@ -1399,7 +1399,7 @@ export namespace ImagePicker { /** * IntentLauncherAndroid */ -export namespace IntentLauncherAndroid { +declare namespace IntentLauncherAndroid { const ACTION_ACCESSIBILITY_SETTINGS: string; const ACTION_APP_NOTIFICATION_REDACTION: string; const ACTION_CONDITION_PROVIDER_SETTINGS: string; @@ -1509,7 +1509,7 @@ export class LinearGradient extends Component { } /** * Location */ -export namespace Location { +declare namespace Location { interface LocationOptions { enableHighAccuracy?: boolean; timeInterval?: number; @@ -1571,7 +1571,7 @@ export namespace Location { /** * Magnetometer */ -export namespace Magnetometer { +declare namespace Magnetometer { interface MagnetometerObject { x: Axis; y: Axis; @@ -1586,7 +1586,7 @@ export namespace Magnetometer { /** * Notifications */ -export namespace Notifications { +declare namespace Notifications { interface Notification { origin: 'selected' | 'received'; data: any; @@ -1632,7 +1632,7 @@ export namespace Notifications { /** * Pedometer */ -export namespace Pedometer { +declare namespace Pedometer { function isAvailableAsync(): Promise; function getStepCountAsync(start: Date, end: Date): Promise<{ steps: number; }>; function watchStepCount(callback: (params: { steps: number; }) => void): EventSubscription; @@ -1641,7 +1641,7 @@ export namespace Pedometer { /** * Permissions */ -export namespace Permissions { +declare namespace Permissions { type PermissionType = 'remoteNotifications' | 'location' | 'camera' | 'contacts' | 'audioRecording'; type PermissionStatus = 'undetermined' | 'granted' | 'denied'; @@ -1679,7 +1679,7 @@ export function registerRootComponent(component: Component): Component; /** * ScreenOrientation */ -export namespace ScreenOrientation { +declare namespace ScreenOrientation { interface Orientation { ALL: 'ALL'; ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN'; @@ -1697,7 +1697,7 @@ export namespace ScreenOrientation { /** * SecureStore */ -export namespace SecureStore { +declare namespace SecureStore { interface SecureStoreOptions { keychainService?: string; keychainAccessible?: number; @@ -1710,7 +1710,7 @@ export namespace SecureStore { /** * Segment */ -export namespace Segment { +declare namespace Segment { function initialize(keys: { androidWriteKey: string; iosWriteKey: string; @@ -1728,7 +1728,7 @@ export namespace Segment { /** * Speech */ -export namespace Speech { +declare namespace Speech { interface SpeechOptions { language?: string; pitch?: number; @@ -1747,7 +1747,7 @@ export namespace Speech { /** * SQLite */ -export namespace SQLite { +declare namespace SQLite { type Error = any; interface Database { @@ -1945,7 +1945,7 @@ export function takeSnapshotAsync( ): Promise; /** Helpful utility functions that don’t fit anywhere else, including some localization and internationalization methods. */ -export namespace Util { +declare namespace Util { /** Returns the current device country code. */ function getCurrentDeviceCountryAsync(): Promise; @@ -2043,7 +2043,7 @@ export class Video extends Component { /** * Web Browser */ -export namespace WebBrowser { +declare namespace WebBrowser { function openBrowserAsync(url: string): Promise<{ type: 'cancelled' | 'dismissed' }>; function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; function dismissBrowser(): Promise<{ type: 'dismissed' }>; From c7b050e1f4747dc2f0c99730b66b588b4da92def Mon Sep 17 00:00:00 2001 From: Jan Aagaard Date: Tue, 23 Jan 2018 21:24:13 +0100 Subject: [PATCH 22/52] Revert "Add vector-icons" This reverts commit f86734a632efcedabca6272f9ea1d9b3badc8f33. --- types/expo/index.d.ts | 74 ------------------------------------------- 1 file changed, 74 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index b3f5f15f70..fb16ade744 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -2048,77 +2048,3 @@ declare namespace WebBrowser { function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; function dismissBrowser(): Promise<{ type: 'dismissed' }>; } - -declare module '@expo/vector-icons' { - import { Component } from 'react' - import { TextStyle } from 'react-native' - - interface BaseIconProps { - size?: number - color?: string - style?: TextStyle - } - - // Icon names taken from https://github.com/expo/vector-icons/tree/master/vendor/react-native-vector-icons/glyphmaps. - interface EntypoProps extends BaseIconProps { - name: '500px' | '500px-with-circle' | 'add-to-list' | 'add-user' | 'address' | 'adjust' | 'air' | 'aircraft' | 'aircraft-landing' | 'aircraft-take-off' | 'align-bottom' | 'align-horizontal-middle' | 'align-left' | 'align-right' | 'align-top' | 'align-vertical-middle' | 'app-store' | 'archive' | 'area-graph' | 'arrow-bold-down' | 'arrow-bold-left' | 'arrow-bold-right' | 'arrow-bold-up' | 'arrow-down' | 'arrow-left' | 'arrow-long-down' | 'arrow-long-left' | 'arrow-long-right' | 'arrow-long-up' | 'arrow-right' | 'arrow-up' | 'arrow-with-circle-down' | 'arrow-with-circle-left' | 'arrow-with-circle-right' | 'arrow-with-circle-up' | 'attachment' | 'awareness-ribbon' | 'back' | 'back-in-time' | 'baidu' | 'bar-graph' | 'basecamp' | 'battery' | 'beamed-note' | 'behance' | 'bell' | 'blackboard' | 'block' | 'book' | 'bookmark' | 'bookmarks' | 'bowl' | 'box' | 'briefcase' | 'browser' | 'brush' | 'bucket' | 'bug' | 'cake' | 'calculator' | 'calendar' | 'camera' | 'ccw' | 'chat' | 'check' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-small-down' | 'chevron-small-left' | 'chevron-small-right' | 'chevron-small-up' | 'chevron-thin-down' | 'chevron-thin-left' | 'chevron-thin-right' | 'chevron-thin-up' | 'chevron-up' | 'chevron-with-circle-down' | 'chevron-with-circle-left' | 'chevron-with-circle-right' | 'chevron-with-circle-up' | 'circle' | 'circle-with-cross' | 'circle-with-minus' | 'circle-with-plus' | 'circular-graph' | 'clapperboard' | 'classic-computer' | 'clipboard' | 'clock' | 'cloud' | 'code' | 'cog' | 'colours' | 'compass' | 'controller-fast-backward' | 'controller-fast-forward' | 'controller-jump-to-start' | 'controller-next' | 'controller-paus' | 'controller-play' | 'controller-record' | 'controller-stop' | 'controller-volume' | 'copy' | 'creative-cloud' | 'creative-commons' | 'creative-commons-attribution' | 'creative-commons-noderivs' | 'creative-commons-noncommercial-eu' | 'creative-commons-noncommercial-us' | 'creative-commons-public-domain' | 'creative-commons-remix' | 'creative-commons-share' | 'creative-commons-sharealike' | 'credit' | 'credit-card' | 'crop' | 'cross' | 'cup' | 'cw' | 'cycle' | 'database' | 'dial-pad' | 'direction' | 'document' | 'document-landscape' | 'documents' | 'dot-single' | 'dots-three-horizontal' | 'dots-three-vertical' | 'dots-two-horizontal' | 'dots-two-vertical' | 'download' | 'dribbble' | 'dribbble-with-circle' | 'drink' | 'drive' | 'drop' | 'dropbox' | 'edit' | 'email' | 'emoji-flirt' | 'emoji-happy' | 'emoji-neutral' | 'emoji-sad' | 'erase' | 'eraser' | 'evernote' | 'export' | 'eye' | 'eye-with-line' | 'facebook' | 'facebook-with-circle' | 'feather' | 'fingerprint' | 'flag' | 'flash' | 'flashlight' | 'flat-brush' | 'flattr' | 'flickr' | 'flickr-with-circle' | 'flow-branch' | 'flow-cascade' | 'flow-line' | 'flow-parallel' | 'flow-tree' | 'flower' | 'folder' | 'folder-images' | 'folder-music' | 'folder-video' | 'forward' | 'foursquare' | 'funnel' | 'game-controller' | 'gauge' | 'github' | 'github-with-circle' | 'globe' | 'google-' | 'google--with-circle' | 'google-drive' | 'google-hangouts' | 'google-play' | 'graduation-cap' | 'grid' | 'grooveshark' | 'hair-cross' | 'hand' | 'heart' | 'heart-outlined' | 'help' | 'help-with-circle' | 'home' | 'hour-glass' | 'houzz' | 'icloud' | 'image' | 'image-inverted' | 'images' | 'inbox' | 'infinity' | 'info' | 'info-with-circle' | 'instagram' | 'instagram-with-circle' | 'install' | 'key' | 'keyboard' | 'lab-flask' | 'landline' | 'language' | 'laptop' | 'lastfm' | 'lastfm-with-circle' | 'layers' | 'leaf' | 'level-down' | 'level-up' | 'lifebuoy' | 'light-bulb' | 'light-down' | 'light-up' | 'line-graph' | 'link' | 'linkedin' | 'linkedin-with-circle' | 'list' | 'location' | 'location-pin' | 'lock' | 'lock-open' | 'log-out' | 'login' | 'loop' | 'magnet' | 'magnifying-glass' | 'mail' | 'mail-with-circle' | 'man' | 'map' | 'mask' | 'medal' | 'medium' | 'medium-with-circle' | 'megaphone' | 'menu' | 'merge' | 'message' | 'mic' | 'minus' | 'mixi' | 'mobile' | 'modern-mic' | 'moon' | 'mouse' | 'mouse-pointer' | 'music' | 'network' | 'new' | 'new-message' | 'news' | 'newsletter' | 'note' | 'notification' | 'notifications-off' | 'old-mobile' | 'old-phone' | 'onedrive' | 'open-book' | 'palette' | 'paper-plane' | 'paypal' | 'pencil' | 'phone' | 'picasa' | 'pie-chart' | 'pin' | 'pinterest' | 'pinterest-with-circle' | 'plus' | 'popup' | 'power-plug' | 'price-ribbon' | 'price-tag' | 'print' | 'progress-empty' | 'progress-full' | 'progress-one' | 'progress-two' | 'publish' | 'qq' | 'qq-with-circle' | 'quote' | 'radio' | 'raft' | 'raft-with-circle' | 'rainbow' | 'rdio' | 'rdio-with-circle' | 'remove-user' | 'renren' | 'reply' | 'reply-all' | 'resize-100-' | 'resize-full-screen' | 'retweet' | 'rocket' | 'round-brush' | 'rss' | 'ruler' | 'save' | 'scissors' | 'scribd' | 'select-arrows' | 'share' | 'share-alternative' | 'shareable' | 'shield' | 'shop' | 'shopping-bag' | 'shopping-basket' | 'shopping-cart' | 'shuffle' | 'signal' | 'sina-weibo' | 'skype' | 'skype-with-circle' | 'slideshare' | 'smashing' | 'sound' | 'sound-mix' | 'sound-mute' | 'soundcloud' | 'sports-club' | 'spotify' | 'spotify-with-circle' | 'spreadsheet' | 'squared-cross' | 'squared-minus' | 'squared-plus' | 'star' | 'star-outlined' | 'stopwatch' | 'stumbleupon' | 'stumbleupon-with-circle' | 'suitcase' | 'swap' | 'swarm' | 'sweden' | 'switch' | 'tablet' | 'tablet-mobile-combo' | 'tag' | 'text' | 'text-document' | 'text-document-inverted' | 'thermometer' | 'thumbs-down' | 'thumbs-up' | 'thunder-cloud' | 'ticket' | 'time-slot' | 'tools' | 'traffic-cone' | 'trash' | 'tree' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'tripadvisor' | 'trophy' | 'tumblr' | 'tumblr-with-circle' | 'tv' | 'twitter' | 'twitter-with-circle' | 'typing' | 'uninstall' | 'unread' | 'untag' | 'upload' | 'upload-to-cloud' | 'user' | 'users' | 'v-card' | 'video' | 'video-camera' | 'vimeo' | 'vimeo-with-circle' | 'vine' | 'vine-with-circle' | 'vinyl' | 'vk' | 'vk-alternitive' | 'vk-with-circle' | 'voicemail' | 'wallet' | 'warning' | 'water' | 'windows-store' | 'xing' | 'xing-with-circle' | 'yelp' | 'youko' | 'youko-with-circle' | 'youtube' | 'youtube-with-circle' - } - - interface EvilIconsProps extends BaseIconProps { - name: 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'bell' | 'calendar' | 'camera' | 'cart' | 'chart' | 'check' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'clock' | 'close' | 'close-o' | 'comment' | 'credit-card' | 'envelope' | 'exclamation' | 'external-link' | 'eye' | 'gear' | 'heart' | 'image' | 'like' | 'link' | 'location' | 'lock' | 'minus' | 'navicon' | 'paperclip' | 'pencil' | 'play' | 'plus' | 'pointer' | 'question' | 'redo' | 'refresh' | 'retweet' | 'sc-facebook' | 'sc-github' | 'sc-google-plus' | 'sc-instagram' | 'sc-linkedin' | 'sc-odnoklassniki' | 'sc-pinterest' | 'sc-skype' | 'sc-soundcloud' | 'sc-telegram' | 'sc-tumblr' | 'sc-twitter' | 'sc-vimeo' | 'sc-vk' | 'sc-youtube' | 'search' | 'share-apple' | 'share-google' | 'spinner' | 'spinner-2' | 'spinner-3' | 'star' | 'tag' | 'trash' | 'trophy' | 'undo' | 'unlock' | 'user' - } - - interface FeatherProps extends BaseIconProps { - name: 'activity' | 'airplay' | 'alert-circle' | 'alert-octagon' | 'alert-triangle' | 'align-center' | 'align-justify' | 'align-left' | 'align-right' | 'anchor' | 'aperture' | 'arrow-down' | 'arrow-down-left' | 'arrow-down-right' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-left' | 'arrow-up-right' | 'at-sign' | 'award' | 'bar-chart' | 'bar-chart-2' | 'battery' | 'battery-charging' | 'bell' | 'bell-off' | 'bluetooth' | 'bold' | 'book' | 'bookmark' | 'box' | 'briefcase' | 'calendar' | 'camera' | 'camera-off' | 'cast' | 'check' | 'check-circle' | 'check-square' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-down' | 'chevrons-left' | 'chevrons-right' | 'chevrons-up' | 'chrome' | 'circle' | 'clipboard' | 'clock' | 'cloud' | 'cloud-drizzle' | 'cloud-lightning' | 'cloud-off' | 'cloud-rain' | 'cloud-snow' | 'codepen' | 'command' | 'compass' | 'copy' | 'corner-down-left' | 'corner-down-right' | 'corner-left-down' | 'corner-left-up' | 'corner-right-down' | 'corner-right-up' | 'corner-up-left' | 'corner-up-right' | 'cpu' | 'credit-card' | 'crop' | 'crosshair' | 'delete' | 'disc' | 'download' | 'download-cloud' | 'droplet' | 'edit' | 'edit-2' | 'edit-3' | 'external-link' | 'eye' | 'eye-off' | 'facebook' | 'fast-forward' | 'feather' | 'file' | 'file-minus' | 'file-plus' | 'file-text' | 'film' | 'filter' | 'flag' | 'folder' | 'github' | 'gitlab' | 'globe' | 'grid' | 'hash' | 'headphones' | 'heart' | 'help-circle' | 'home' | 'image' | 'inbox' | 'info' | 'instagram' | 'italic' | 'layers' | 'layout' | 'life-buoy' | 'link' | 'link-2' | 'list' | 'loader' | 'lock' | 'log-in' | 'log-out' | 'mail' | 'map' | 'map-pin' | 'maximize' | 'maximize-2' | 'menu' | 'message-circle' | 'message-square' | 'mic' | 'mic-off' | 'minimize' | 'minimize-2' | 'minus' | 'minus-circle' | 'minus-square' | 'monitor' | 'moon' | 'more-horizontal' | 'more-vertical' | 'move' | 'music' | 'navigation' | 'navigation-2' | 'octagon' | 'package' | 'paperclip' | 'pause' | 'pause-circle' | 'percent' | 'phone' | 'phone-call' | 'phone-forwarded' | 'phone-incoming' | 'phone-missed' | 'phone-off' | 'phone-outgoing' | 'pie-chart' | 'play' | 'play-circle' | 'plus' | 'plus-circle' | 'plus-square' | 'pocket' | 'power' | 'printer' | 'radio' | 'refresh-ccw' | 'refresh-cw' | 'repeat' | 'rewind' | 'rotate-ccw' | 'rotate-cw' | 'save' | 'scissors' | 'search' | 'server' | 'settings' | 'share' | 'share-2' | 'shield' | 'shopping-cart' | 'shuffle' | 'sidebar' | 'skip-back' | 'skip-forward' | 'slack' | 'slash' | 'sliders' | 'smartphone' | 'speaker' | 'square' | 'star' | 'stop-circle' | 'sun' | 'sunrise' | 'sunset' | 'tablet' | 'tag' | 'target' | 'thermometer' | 'thumbs-down' | 'thumbs-up' | 'toggle-left' | 'toggle-right' | 'trash' | 'trash-2' | 'trending-down' | 'trending-up' | 'triangle' | 'tv' | 'twitter' | 'type' | 'umbrella' | 'underline' | 'unlock' | 'upload' | 'upload-cloud' | 'user' | 'user-check' | 'user-minus' | 'user-plus' | 'user-x' | 'users' | 'video' | 'video-off' | 'voicemail' | 'volume' | 'volume-1' | 'volume-2' | 'volume-x' | 'watch' | 'wifi' | 'wifi-off' | 'wind' | 'x' | 'x-circle' | 'x-square' | 'zap' | 'zoom-in' | 'zoom-out' - } - - interface FontAwesomeProps extends BaseIconProps { - name: 'glass' | 'music' | 'search' | 'envelope-o' | 'heart' | 'star' | 'star-o' | 'user' | 'film' | 'th-large' | 'th' | 'th-list' | 'check' | 'remove' | 'close' | 'times' | 'search-plus' | 'search-minus' | 'power-off' | 'signal' | 'gear' | 'cog' | 'trash-o' | 'home' | 'file-o' | 'clock-o' | 'road' | 'download' | 'arrow-circle-o-down' | 'arrow-circle-o-up' | 'inbox' | 'play-circle-o' | 'rotate-right' | 'repeat' | 'refresh' | 'list-alt' | 'lock' | 'flag' | 'headphones' | 'volume-off' | 'volume-down' | 'volume-up' | 'qrcode' | 'barcode' | 'tag' | 'tags' | 'book' | 'bookmark' | 'print' | 'camera' | 'font' | 'bold' | 'italic' | 'text-height' | 'text-width' | 'align-left' | 'align-center' | 'align-right' | 'align-justify' | 'list' | 'dedent' | 'outdent' | 'indent' | 'video-camera' | 'photo' | 'image' | 'picture-o' | 'pencil' | 'map-marker' | 'adjust' | 'tint' | 'edit' | 'pencil-square-o' | 'share-square-o' | 'check-square-o' | 'arrows' | 'step-backward' | 'fast-backward' | 'backward' | 'play' | 'pause' | 'stop' | 'forward' | 'fast-forward' | 'step-forward' | 'eject' | 'chevron-left' | 'chevron-right' | 'plus-circle' | 'minus-circle' | 'times-circle' | 'check-circle' | 'question-circle' | 'info-circle' | 'crosshairs' | 'times-circle-o' | 'check-circle-o' | 'ban' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-down' | 'mail-forward' | 'share' | 'expand' | 'compress' | 'plus' | 'minus' | 'asterisk' | 'exclamation-circle' | 'gift' | 'leaf' | 'fire' | 'eye' | 'eye-slash' | 'warning' | 'exclamation-triangle' | 'plane' | 'calendar' | 'random' | 'comment' | 'magnet' | 'chevron-up' | 'chevron-down' | 'retweet' | 'shopping-cart' | 'folder' | 'folder-open' | 'arrows-v' | 'arrows-h' | 'bar-chart-o' | 'bar-chart' | 'twitter-square' | 'facebook-square' | 'camera-retro' | 'key' | 'gears' | 'cogs' | 'comments' | 'thumbs-o-up' | 'thumbs-o-down' | 'star-half' | 'heart-o' | 'sign-out' | 'linkedin-square' | 'thumb-tack' | 'external-link' | 'sign-in' | 'trophy' | 'github-square' | 'upload' | 'lemon-o' | 'phone' | 'square-o' | 'bookmark-o' | 'phone-square' | 'twitter' | 'facebook-f' | 'facebook' | 'github' | 'unlock' | 'credit-card' | 'feed' | 'rss' | 'hdd-o' | 'bullhorn' | 'bell' | 'certificate' | 'hand-o-right' | 'hand-o-left' | 'hand-o-up' | 'hand-o-down' | 'arrow-circle-left' | 'arrow-circle-right' | 'arrow-circle-up' | 'arrow-circle-down' | 'globe' | 'wrench' | 'tasks' | 'filter' | 'briefcase' | 'arrows-alt' | 'group' | 'users' | 'chain' | 'link' | 'cloud' | 'flask' | 'cut' | 'scissors' | 'copy' | 'files-o' | 'paperclip' | 'save' | 'floppy-o' | 'square' | 'navicon' | 'reorder' | 'bars' | 'list-ul' | 'list-ol' | 'strikethrough' | 'underline' | 'table' | 'magic' | 'truck' | 'pinterest' | 'pinterest-square' | 'google-plus-square' | 'google-plus' | 'money' | 'caret-down' | 'caret-up' | 'caret-left' | 'caret-right' | 'columns' | 'unsorted' | 'sort' | 'sort-down' | 'sort-desc' | 'sort-up' | 'sort-asc' | 'envelope' | 'linkedin' | 'rotate-left' | 'undo' | 'legal' | 'gavel' | 'dashboard' | 'tachometer' | 'comment-o' | 'comments-o' | 'flash' | 'bolt' | 'sitemap' | 'umbrella' | 'paste' | 'clipboard' | 'lightbulb-o' | 'exchange' | 'cloud-download' | 'cloud-upload' | 'user-md' | 'stethoscope' | 'suitcase' | 'bell-o' | 'coffee' | 'cutlery' | 'file-text-o' | 'building-o' | 'hospital-o' | 'ambulance' | 'medkit' | 'fighter-jet' | 'beer' | 'h-square' | 'plus-square' | 'angle-double-left' | 'angle-double-right' | 'angle-double-up' | 'angle-double-down' | 'angle-left' | 'angle-right' | 'angle-up' | 'angle-down' | 'desktop' | 'laptop' | 'tablet' | 'mobile-phone' | 'mobile' | 'circle-o' | 'quote-left' | 'quote-right' | 'spinner' | 'circle' | 'mail-reply' | 'reply' | 'github-alt' | 'folder-o' | 'folder-open-o' | 'smile-o' | 'frown-o' | 'meh-o' | 'gamepad' | 'keyboard-o' | 'flag-o' | 'flag-checkered' | 'terminal' | 'code' | 'mail-reply-all' | 'reply-all' | 'star-half-empty' | 'star-half-full' | 'star-half-o' | 'location-arrow' | 'crop' | 'code-fork' | 'unlink' | 'chain-broken' | 'question' | 'info' | 'exclamation' | 'superscript' | 'subscript' | 'eraser' | 'puzzle-piece' | 'microphone' | 'microphone-slash' | 'shield' | 'calendar-o' | 'fire-extinguisher' | 'rocket' | 'maxcdn' | 'chevron-circle-left' | 'chevron-circle-right' | 'chevron-circle-up' | 'chevron-circle-down' | 'html5' | 'css3' | 'anchor' | 'unlock-alt' | 'bullseye' | 'ellipsis-h' | 'ellipsis-v' | 'rss-square' | 'play-circle' | 'ticket' | 'minus-square' | 'minus-square-o' | 'level-up' | 'level-down' | 'check-square' | 'pencil-square' | 'external-link-square' | 'share-square' | 'compass' | 'toggle-down' | 'caret-square-o-down' | 'toggle-up' | 'caret-square-o-up' | 'toggle-right' | 'caret-square-o-right' | 'euro' | 'eur' | 'gbp' | 'dollar' | 'usd' | 'rupee' | 'inr' | 'cny' | 'rmb' | 'yen' | 'jpy' | 'ruble' | 'rouble' | 'rub' | 'won' | 'krw' | 'bitcoin' | 'btc' | 'file' | 'file-text' | 'sort-alpha-asc' | 'sort-alpha-desc' | 'sort-amount-asc' | 'sort-amount-desc' | 'sort-numeric-asc' | 'sort-numeric-desc' | 'thumbs-up' | 'thumbs-down' | 'youtube-square' | 'youtube' | 'xing' | 'xing-square' | 'youtube-play' | 'dropbox' | 'stack-overflow' | 'instagram' | 'flickr' | 'adn' | 'bitbucket' | 'bitbucket-square' | 'tumblr' | 'tumblr-square' | 'long-arrow-down' | 'long-arrow-up' | 'long-arrow-left' | 'long-arrow-right' | 'apple' | 'windows' | 'android' | 'linux' | 'dribbble' | 'skype' | 'foursquare' | 'trello' | 'female' | 'male' | 'gittip' | 'gratipay' | 'sun-o' | 'moon-o' | 'archive' | 'bug' | 'vk' | 'weibo' | 'renren' | 'pagelines' | 'stack-exchange' | 'arrow-circle-o-right' | 'arrow-circle-o-left' | 'toggle-left' | 'caret-square-o-left' | 'dot-circle-o' | 'wheelchair' | 'vimeo-square' | 'turkish-lira' | 'try' | 'plus-square-o' | 'space-shuttle' | 'slack' | 'envelope-square' | 'wordpress' | 'openid' | 'institution' | 'bank' | 'university' | 'mortar-board' | 'graduation-cap' | 'yahoo' | 'google' | 'reddit' | 'reddit-square' | 'stumbleupon-circle' | 'stumbleupon' | 'delicious' | 'digg' | 'pied-piper-pp' | 'pied-piper-alt' | 'drupal' | 'joomla' | 'language' | 'fax' | 'building' | 'child' | 'paw' | 'spoon' | 'cube' | 'cubes' | 'behance' | 'behance-square' | 'steam' | 'steam-square' | 'recycle' | 'automobile' | 'car' | 'cab' | 'taxi' | 'tree' | 'spotify' | 'deviantart' | 'soundcloud' | 'database' | 'file-pdf-o' | 'file-word-o' | 'file-excel-o' | 'file-powerpoint-o' | 'file-photo-o' | 'file-picture-o' | 'file-image-o' | 'file-zip-o' | 'file-archive-o' | 'file-sound-o' | 'file-audio-o' | 'file-movie-o' | 'file-video-o' | 'file-code-o' | 'vine' | 'codepen' | 'jsfiddle' | 'life-bouy' | 'life-buoy' | 'life-saver' | 'support' | 'life-ring' | 'circle-o-notch' | 'ra' | 'resistance' | 'rebel' | 'ge' | 'empire' | 'git-square' | 'git' | 'y-combinator-square' | 'yc-square' | 'hacker-news' | 'tencent-weibo' | 'qq' | 'wechat' | 'weixin' | 'send' | 'paper-plane' | 'send-o' | 'paper-plane-o' | 'history' | 'circle-thin' | 'header' | 'paragraph' | 'sliders' | 'share-alt' | 'share-alt-square' | 'bomb' | 'soccer-ball-o' | 'futbol-o' | 'tty' | 'binoculars' | 'plug' | 'slideshare' | 'twitch' | 'yelp' | 'newspaper-o' | 'wifi' | 'calculator' | 'paypal' | 'google-wallet' | 'cc-visa' | 'cc-mastercard' | 'cc-discover' | 'cc-amex' | 'cc-paypal' | 'cc-stripe' | 'bell-slash' | 'bell-slash-o' | 'trash' | 'copyright' | 'at' | 'eyedropper' | 'paint-brush' | 'birthday-cake' | 'area-chart' | 'pie-chart' | 'line-chart' | 'lastfm' | 'lastfm-square' | 'toggle-off' | 'toggle-on' | 'bicycle' | 'bus' | 'ioxhost' | 'angellist' | 'cc' | 'shekel' | 'sheqel' | 'ils' | 'meanpath' | 'buysellads' | 'connectdevelop' | 'dashcube' | 'forumbee' | 'leanpub' | 'sellsy' | 'shirtsinbulk' | 'simplybuilt' | 'skyatlas' | 'cart-plus' | 'cart-arrow-down' | 'diamond' | 'ship' | 'user-secret' | 'motorcycle' | 'street-view' | 'heartbeat' | 'venus' | 'mars' | 'mercury' | 'intersex' | 'transgender' | 'transgender-alt' | 'venus-double' | 'mars-double' | 'venus-mars' | 'mars-stroke' | 'mars-stroke-v' | 'mars-stroke-h' | 'neuter' | 'genderless' | 'facebook-official' | 'pinterest-p' | 'whatsapp' | 'server' | 'user-plus' | 'user-times' | 'hotel' | 'bed' | 'viacoin' | 'train' | 'subway' | 'medium' | 'yc' | 'y-combinator' | 'optin-monster' | 'opencart' | 'expeditedssl' | 'battery-4' | 'battery' | 'battery-full' | 'battery-3' | 'battery-three-quarters' | 'battery-2' | 'battery-half' | 'battery-1' | 'battery-quarter' | 'battery-0' | 'battery-empty' | 'mouse-pointer' | 'i-cursor' | 'object-group' | 'object-ungroup' | 'sticky-note' | 'sticky-note-o' | 'cc-jcb' | 'cc-diners-club' | 'clone' | 'balance-scale' | 'hourglass-o' | 'hourglass-1' | 'hourglass-start' | 'hourglass-2' | 'hourglass-half' | 'hourglass-3' | 'hourglass-end' | 'hourglass' | 'hand-grab-o' | 'hand-rock-o' | 'hand-stop-o' | 'hand-paper-o' | 'hand-scissors-o' | 'hand-lizard-o' | 'hand-spock-o' | 'hand-pointer-o' | 'hand-peace-o' | 'trademark' | 'registered' | 'creative-commons' | 'gg' | 'gg-circle' | 'tripadvisor' | 'odnoklassniki' | 'odnoklassniki-square' | 'get-pocket' | 'wikipedia-w' | 'safari' | 'chrome' | 'firefox' | 'opera' | 'internet-explorer' | 'tv' | 'television' | 'contao' | '500px' | 'amazon' | 'calendar-plus-o' | 'calendar-minus-o' | 'calendar-times-o' | 'calendar-check-o' | 'industry' | 'map-pin' | 'map-signs' | 'map-o' | 'map' | 'commenting' | 'commenting-o' | 'houzz' | 'vimeo' | 'black-tie' | 'fonticons' | 'reddit-alien' | 'edge' | 'credit-card-alt' | 'codiepie' | 'modx' | 'fort-awesome' | 'usb' | 'product-hunt' | 'mixcloud' | 'scribd' | 'pause-circle' | 'pause-circle-o' | 'stop-circle' | 'stop-circle-o' | 'shopping-bag' | 'shopping-basket' | 'hashtag' | 'bluetooth' | 'bluetooth-b' | 'percent' | 'gitlab' | 'wpbeginner' | 'wpforms' | 'envira' | 'universal-access' | 'wheelchair-alt' | 'question-circle-o' | 'blind' | 'audio-description' | 'volume-control-phone' | 'braille' | 'assistive-listening-systems' | 'asl-interpreting' | 'american-sign-language-interpreting' | 'deafness' | 'hard-of-hearing' | 'deaf' | 'glide' | 'glide-g' | 'signing' | 'sign-language' | 'low-vision' | 'viadeo' | 'viadeo-square' | 'snapchat' | 'snapchat-ghost' | 'snapchat-square' | 'pied-piper' | 'first-order' | 'yoast' | 'themeisle' | 'google-plus-circle' | 'google-plus-official' | 'fa' | 'font-awesome' | 'handshake-o' | 'envelope-open' | 'envelope-open-o' | 'linode' | 'address-book' | 'address-book-o' | 'vcard' | 'address-card' | 'vcard-o' | 'address-card-o' | 'user-circle' | 'user-circle-o' | 'user-o' | 'id-badge' | 'drivers-license' | 'id-card' | 'drivers-license-o' | 'id-card-o' | 'quora' | 'free-code-camp' | 'telegram' | 'thermometer-4' | 'thermometer' | 'thermometer-full' | 'thermometer-3' | 'thermometer-three-quarters' | 'thermometer-2' | 'thermometer-half' | 'thermometer-1' | 'thermometer-quarter' | 'thermometer-0' | 'thermometer-empty' | 'shower' | 'bathtub' | 's15' | 'bath' | 'podcast' | 'window-maximize' | 'window-minimize' | 'window-restore' | 'times-rectangle' | 'window-close' | 'times-rectangle-o' | 'window-close-o' | 'bandcamp' | 'grav' | 'etsy' | 'imdb' | 'ravelry' | 'eercast' | 'microchip' | 'snowflake-o' | 'superpowers' | 'wpexplorer' | 'meetup' - } - - interface FoundationProps extends BaseIconProps { - name: 'address-book' | 'alert' | 'align-center' | 'align-justify' | 'align-left' | 'align-right' | 'anchor' | 'annotate' | 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrows-compress' | 'arrows-expand' | 'arrows-in' | 'arrows-out' | 'asl' | 'asterisk' | 'at-sign' | 'background-color' | 'battery-empty' | 'battery-full' | 'battery-half' | 'bitcoin-circle' | 'bitcoin' | 'blind' | 'bluetooth' | 'bold' | 'book-bookmark' | 'book' | 'bookmark' | 'braille' | 'burst-new' | 'burst-sale' | 'burst' | 'calendar' | 'camera' | 'check' | 'checkbox' | 'clipboard-notes' | 'clipboard-pencil' | 'clipboard' | 'clock' | 'closed-caption' | 'cloud' | 'comment-minus' | 'comment-quotes' | 'comment-video' | 'comment' | 'comments' | 'compass' | 'contrast' | 'credit-card' | 'crop' | 'crown' | 'css3' | 'database' | 'die-five' | 'die-four' | 'die-one' | 'die-six' | 'die-three' | 'die-two' | 'dislike' | 'dollar-bill' | 'dollar' | 'download' | 'eject' | 'elevator' | 'euro' | 'eye' | 'fast-forward' | 'female-symbol' | 'female' | 'filter' | 'first-aid' | 'flag' | 'folder-add' | 'folder-lock' | 'folder' | 'foot' | 'foundation' | 'graph-bar' | 'graph-horizontal' | 'graph-pie' | 'graph-trend' | 'guide-dog' | 'hearing-aid' | 'heart' | 'home' | 'html5' | 'indent-less' | 'indent-more' | 'info' | 'italic' | 'key' | 'laptop' | 'layout' | 'lightbulb' | 'like' | 'link' | 'list-bullet' | 'list-number' | 'list-thumbnails' | 'list' | 'lock' | 'loop' | 'magnifying-glass' | 'mail' | 'male-female' | 'male-symbol' | 'male' | 'map' | 'marker' | 'megaphone' | 'microphone' | 'minus-circle' | 'minus' | 'mobile-signal' | 'mobile' | 'monitor' | 'mountains' | 'music' | 'next' | 'no-dogs' | 'no-smoking' | 'page-add' | 'page-copy' | 'page-csv' | 'page-delete' | 'page-doc' | 'page-edit' | 'page-export-csv' | 'page-export-doc' | 'page-export-pdf' | 'page-export' | 'page-filled' | 'page-multiple' | 'page-pdf' | 'page-remove' | 'page-search' | 'page' | 'paint-bucket' | 'paperclip' | 'pause' | 'paw' | 'paypal' | 'pencil' | 'photo' | 'play-circle' | 'play-video' | 'play' | 'plus' | 'pound' | 'power' | 'previous' | 'price-tag' | 'pricetag-multiple' | 'print' | 'prohibited' | 'projection-screen' | 'puzzle' | 'quote' | 'record' | 'refresh' | 'results-demographics' | 'results' | 'rewind-ten' | 'rewind' | 'rss' | 'safety-cone' | 'save' | 'share' | 'sheriff-badge' | 'shield' | 'shopping-bag' | 'shopping-cart' | 'shuffle' | 'skull' | 'social-500px' | 'social-adobe' | 'social-amazon' | 'social-android' | 'social-apple' | 'social-behance' | 'social-bing' | 'social-blogger' | 'social-delicious' | 'social-designer-news' | 'social-deviant-art' | 'social-digg' | 'social-dribbble' | 'social-drive' | 'social-dropbox' | 'social-evernote' | 'social-facebook' | 'social-flickr' | 'social-forrst' | 'social-foursquare' | 'social-game-center' | 'social-github' | 'social-google-plus' | 'social-hacker-news' | 'social-hi5' | 'social-instagram' | 'social-joomla' | 'social-lastfm' | 'social-linkedin' | 'social-medium' | 'social-myspace' | 'social-orkut' | 'social-path' | 'social-picasa' | 'social-pinterest' | 'social-rdio' | 'social-reddit' | 'social-skillshare' | 'social-skype' | 'social-smashing-mag' | 'social-snapchat' | 'social-spotify' | 'social-squidoo' | 'social-stack-overflow' | 'social-steam' | 'social-stumbleupon' | 'social-treehouse' | 'social-tumblr' | 'social-twitter' | 'social-vimeo' | 'social-windows' | 'social-xbox' | 'social-yahoo' | 'social-yelp' | 'social-youtube' | 'social-zerply' | 'social-zurb' | 'sound' | 'star' | 'stop' | 'strikethrough' | 'subscript' | 'superscript' | 'tablet-landscape' | 'tablet-portrait' | 'target-two' | 'target' | 'telephone-accessible' | 'telephone' | 'text-color' | 'thumbnails' | 'ticket' | 'torso-business' | 'torso-female' | 'torso' | 'torsos-all-female' | 'torsos-all' | 'torsos-female-male' | 'torsos-male-female' | 'torsos' | 'trash' | 'trees' | 'trophy' | 'underline' | 'universal-access' | 'unlink' | 'unlock' | 'upload-cloud' | 'upload' | 'usb' | 'video' | 'volume-none' | 'volume-strike' | 'volume' | 'web' | 'wheelchair' | 'widget' | 'wrench' | 'x-circle' | 'x' | 'yen' | 'zoom-in' | 'zoom-out' - } - - interface IoniconsProps extends BaseIconProps { - name: 'ios-add' | 'ios-add-circle' | 'ios-add-circle-outline' | 'ios-add-outline' | 'ios-alarm' | 'ios-alarm-outline' | 'ios-albums' | 'ios-albums-outline' | 'ios-alert' | 'ios-alert-outline' | 'ios-american-football' | 'ios-american-football-outline' | 'ios-analytics' | 'ios-analytics-outline' | 'ios-aperture' | 'ios-aperture-outline' | 'ios-apps' | 'ios-apps-outline' | 'ios-appstore' | 'ios-appstore-outline' | 'ios-archive' | 'ios-archive-outline' | 'ios-arrow-back' | 'ios-arrow-back-outline' | 'ios-arrow-down' | 'ios-arrow-down-outline' | 'ios-arrow-dropdown' | 'ios-arrow-dropdown-circle' | 'ios-arrow-dropdown-circle-outline' | 'ios-arrow-dropdown-outline' | 'ios-arrow-dropleft' | 'ios-arrow-dropleft-circle' | 'ios-arrow-dropleft-circle-outline' | 'ios-arrow-dropleft-outline' | 'ios-arrow-dropright' | 'ios-arrow-dropright-circle' | 'ios-arrow-dropright-circle-outline' | 'ios-arrow-dropright-outline' | 'ios-arrow-dropup' | 'ios-arrow-dropup-circle' | 'ios-arrow-dropup-circle-outline' | 'ios-arrow-dropup-outline' | 'ios-arrow-forward' | 'ios-arrow-forward-outline' | 'ios-arrow-round-back' | 'ios-arrow-round-back-outline' | 'ios-arrow-round-down' | 'ios-arrow-round-down-outline' | 'ios-arrow-round-forward' | 'ios-arrow-round-forward-outline' | 'ios-arrow-round-up' | 'ios-arrow-round-up-outline' | 'ios-arrow-up' | 'ios-arrow-up-outline' | 'ios-at' | 'ios-at-outline' | 'ios-attach' | 'ios-attach-outline' | 'ios-backspace' | 'ios-backspace-outline' | 'ios-barcode' | 'ios-barcode-outline' | 'ios-baseball' | 'ios-baseball-outline' | 'ios-basket' | 'ios-basket-outline' | 'ios-basketball' | 'ios-basketball-outline' | 'ios-battery-charging' | 'ios-battery-charging-outline' | 'ios-battery-dead' | 'ios-battery-dead-outline' | 'ios-battery-full' | 'ios-battery-full-outline' | 'ios-beaker' | 'ios-beaker-outline' | 'ios-beer' | 'ios-beer-outline' | 'ios-bicycle' | 'ios-bicycle-outline' | 'ios-bluetooth' | 'ios-bluetooth-outline' | 'ios-boat' | 'ios-boat-outline' | 'ios-body' | 'ios-body-outline' | 'ios-bonfire' | 'ios-bonfire-outline' | 'ios-book' | 'ios-book-outline' | 'ios-bookmark' | 'ios-bookmark-outline' | 'ios-bookmarks' | 'ios-bookmarks-outline' | 'ios-bowtie' | 'ios-bowtie-outline' | 'ios-briefcase' | 'ios-briefcase-outline' | 'ios-browsers' | 'ios-browsers-outline' | 'ios-brush' | 'ios-brush-outline' | 'ios-bug' | 'ios-bug-outline' | 'ios-build' | 'ios-build-outline' | 'ios-bulb' | 'ios-bulb-outline' | 'ios-bus' | 'ios-bus-outline' | 'ios-cafe' | 'ios-cafe-outline' | 'ios-calculator' | 'ios-calculator-outline' | 'ios-calendar' | 'ios-calendar-outline' | 'ios-call' | 'ios-call-outline' | 'ios-camera' | 'ios-camera-outline' | 'ios-car' | 'ios-car-outline' | 'ios-card' | 'ios-card-outline' | 'ios-cart' | 'ios-cart-outline' | 'ios-cash' | 'ios-cash-outline' | 'ios-chatboxes' | 'ios-chatboxes-outline' | 'ios-chatbubbles' | 'ios-chatbubbles-outline' | 'ios-checkbox' | 'ios-checkbox-outline' | 'ios-checkmark' | 'ios-checkmark-circle' | 'ios-checkmark-circle-outline' | 'ios-checkmark-outline' | 'ios-clipboard' | 'ios-clipboard-outline' | 'ios-clock' | 'ios-clock-outline' | 'ios-close' | 'ios-close-circle' | 'ios-close-circle-outline' | 'ios-close-outline' | 'ios-closed-captioning' | 'ios-closed-captioning-outline' | 'ios-cloud' | 'ios-cloud-circle' | 'ios-cloud-circle-outline' | 'ios-cloud-done' | 'ios-cloud-done-outline' | 'ios-cloud-download' | 'ios-cloud-download-outline' | 'ios-cloud-outline' | 'ios-cloud-upload' | 'ios-cloud-upload-outline' | 'ios-cloudy' | 'ios-cloudy-night' | 'ios-cloudy-night-outline' | 'ios-cloudy-outline' | 'ios-code' | 'ios-code-download' | 'ios-code-download-outline' | 'ios-code-outline' | 'ios-code-working' | 'ios-code-working-outline' | 'ios-cog' | 'ios-cog-outline' | 'ios-color-fill' | 'ios-color-fill-outline' | 'ios-color-filter' | 'ios-color-filter-outline' | 'ios-color-palette' | 'ios-color-palette-outline' | 'ios-color-wand' | 'ios-color-wand-outline' | 'ios-compass' | 'ios-compass-outline' | 'ios-construct' | 'ios-construct-outline' | 'ios-contact' | 'ios-contact-outline' | 'ios-contacts' | 'ios-contacts-outline' | 'ios-contract' | 'ios-contract-outline' | 'ios-contrast' | 'ios-contrast-outline' | 'ios-copy' | 'ios-copy-outline' | 'ios-create' | 'ios-create-outline' | 'ios-crop' | 'ios-crop-outline' | 'ios-cube' | 'ios-cube-outline' | 'ios-cut' | 'ios-cut-outline' | 'ios-desktop' | 'ios-desktop-outline' | 'ios-disc' | 'ios-disc-outline' | 'ios-document' | 'ios-document-outline' | 'ios-done-all' | 'ios-done-all-outline' | 'ios-download' | 'ios-download-outline' | 'ios-easel' | 'ios-easel-outline' | 'ios-egg' | 'ios-egg-outline' | 'ios-exit' | 'ios-exit-outline' | 'ios-expand' | 'ios-expand-outline' | 'ios-eye' | 'ios-eye-off' | 'ios-eye-off-outline' | 'ios-eye-outline' | 'ios-fastforward' | 'ios-fastforward-outline' | 'ios-female' | 'ios-female-outline' | 'ios-filing' | 'ios-filing-outline' | 'ios-film' | 'ios-film-outline' | 'ios-finger-print' | 'ios-finger-print-outline' | 'ios-flag' | 'ios-flag-outline' | 'ios-flame' | 'ios-flame-outline' | 'ios-flash' | 'ios-flash-outline' | 'ios-flask' | 'ios-flask-outline' | 'ios-flower' | 'ios-flower-outline' | 'ios-folder' | 'ios-folder-open' | 'ios-folder-open-outline' | 'ios-folder-outline' | 'ios-football' | 'ios-football-outline' | 'ios-funnel' | 'ios-funnel-outline' | 'ios-game-controller-a' | 'ios-game-controller-a-outline' | 'ios-game-controller-b' | 'ios-game-controller-b-outline' | 'ios-git-branch' | 'ios-git-branch-outline' | 'ios-git-commit' | 'ios-git-commit-outline' | 'ios-git-compare' | 'ios-git-compare-outline' | 'ios-git-merge' | 'ios-git-merge-outline' | 'ios-git-network' | 'ios-git-network-outline' | 'ios-git-pull-request' | 'ios-git-pull-request-outline' | 'ios-glasses' | 'ios-glasses-outline' | 'ios-globe' | 'ios-globe-outline' | 'ios-grid' | 'ios-grid-outline' | 'ios-hammer' | 'ios-hammer-outline' | 'ios-hand' | 'ios-hand-outline' | 'ios-happy' | 'ios-happy-outline' | 'ios-headset' | 'ios-headset-outline' | 'ios-heart' | 'ios-heart-outline' | 'ios-help' | 'ios-help-buoy' | 'ios-help-buoy-outline' | 'ios-help-circle' | 'ios-help-circle-outline' | 'ios-help-outline' | 'ios-home' | 'ios-home-outline' | 'ios-ice-cream' | 'ios-ice-cream-outline' | 'ios-image' | 'ios-image-outline' | 'ios-images' | 'ios-images-outline' | 'ios-infinite' | 'ios-infinite-outline' | 'ios-information' | 'ios-information-circle' | 'ios-information-circle-outline' | 'ios-information-outline' | 'ios-ionic' | 'ios-ionic-outline' | 'ios-ionitron' | 'ios-ionitron-outline' | 'ios-jet' | 'ios-jet-outline' | 'ios-key' | 'ios-key-outline' | 'ios-keypad' | 'ios-keypad-outline' | 'ios-laptop' | 'ios-laptop-outline' | 'ios-leaf' | 'ios-leaf-outline' | 'ios-link' | 'ios-link-outline' | 'ios-list' | 'ios-list-box' | 'ios-list-box-outline' | 'ios-list-outline' | 'ios-locate' | 'ios-locate-outline' | 'ios-lock' | 'ios-lock-outline' | 'ios-log-in' | 'ios-log-in-outline' | 'ios-log-out' | 'ios-log-out-outline' | 'ios-magnet' | 'ios-magnet-outline' | 'ios-mail' | 'ios-mail-open' | 'ios-mail-open-outline' | 'ios-mail-outline' | 'ios-male' | 'ios-male-outline' | 'ios-man' | 'ios-man-outline' | 'ios-map' | 'ios-map-outline' | 'ios-medal' | 'ios-medal-outline' | 'ios-medical' | 'ios-medical-outline' | 'ios-medkit' | 'ios-medkit-outline' | 'ios-megaphone' | 'ios-megaphone-outline' | 'ios-menu' | 'ios-menu-outline' | 'ios-mic' | 'ios-mic-off' | 'ios-mic-off-outline' | 'ios-mic-outline' | 'ios-microphone' | 'ios-microphone-outline' | 'ios-moon' | 'ios-moon-outline' | 'ios-more' | 'ios-more-outline' | 'ios-move' | 'ios-move-outline' | 'ios-musical-note' | 'ios-musical-note-outline' | 'ios-musical-notes' | 'ios-musical-notes-outline' | 'ios-navigate' | 'ios-navigate-outline' | 'ios-no-smoking' | 'ios-no-smoking-outline' | 'ios-notifications' | 'ios-notifications-off' | 'ios-notifications-off-outline' | 'ios-notifications-outline' | 'ios-nuclear' | 'ios-nuclear-outline' | 'ios-nutrition' | 'ios-nutrition-outline' | 'ios-open' | 'ios-open-outline' | 'ios-options' | 'ios-options-outline' | 'ios-outlet' | 'ios-outlet-outline' | 'ios-paper' | 'ios-paper-outline' | 'ios-paper-plane' | 'ios-paper-plane-outline' | 'ios-partly-sunny' | 'ios-partly-sunny-outline' | 'ios-pause' | 'ios-pause-outline' | 'ios-paw' | 'ios-paw-outline' | 'ios-people' | 'ios-people-outline' | 'ios-person' | 'ios-person-add' | 'ios-person-add-outline' | 'ios-person-outline' | 'ios-phone-landscape' | 'ios-phone-landscape-outline' | 'ios-phone-portrait' | 'ios-phone-portrait-outline' | 'ios-photos' | 'ios-photos-outline' | 'ios-pie' | 'ios-pie-outline' | 'ios-pin' | 'ios-pin-outline' | 'ios-pint' | 'ios-pint-outline' | 'ios-pizza' | 'ios-pizza-outline' | 'ios-plane' | 'ios-plane-outline' | 'ios-planet' | 'ios-planet-outline' | 'ios-play' | 'ios-play-outline' | 'ios-podium' | 'ios-podium-outline' | 'ios-power' | 'ios-power-outline' | 'ios-pricetag' | 'ios-pricetag-outline' | 'ios-pricetags' | 'ios-pricetags-outline' | 'ios-print' | 'ios-print-outline' | 'ios-pulse' | 'ios-pulse-outline' | 'ios-qr-scanner' | 'ios-qr-scanner-outline' | 'ios-quote' | 'ios-quote-outline' | 'ios-radio' | 'ios-radio-button-off' | 'ios-radio-button-off-outline' | 'ios-radio-button-on' | 'ios-radio-button-on-outline' | 'ios-radio-outline' | 'ios-rainy' | 'ios-rainy-outline' | 'ios-recording' | 'ios-recording-outline' | 'ios-redo' | 'ios-redo-outline' | 'ios-refresh' | 'ios-refresh-circle' | 'ios-refresh-circle-outline' | 'ios-refresh-outline' | 'ios-remove' | 'ios-remove-circle' | 'ios-remove-circle-outline' | 'ios-remove-outline' | 'ios-reorder' | 'ios-reorder-outline' | 'ios-repeat' | 'ios-repeat-outline' | 'ios-resize' | 'ios-resize-outline' | 'ios-restaurant' | 'ios-restaurant-outline' | 'ios-return-left' | 'ios-return-left-outline' | 'ios-return-right' | 'ios-return-right-outline' | 'ios-reverse-camera' | 'ios-reverse-camera-outline' | 'ios-rewind' | 'ios-rewind-outline' | 'ios-ribbon' | 'ios-ribbon-outline' | 'ios-rose' | 'ios-rose-outline' | 'ios-sad' | 'ios-sad-outline' | 'ios-school' | 'ios-school-outline' | 'ios-search' | 'ios-search-outline' | 'ios-send' | 'ios-send-outline' | 'ios-settings' | 'ios-settings-outline' | 'ios-share' | 'ios-share-alt' | 'ios-share-alt-outline' | 'ios-share-outline' | 'ios-shirt' | 'ios-shirt-outline' | 'ios-shuffle' | 'ios-shuffle-outline' | 'ios-skip-backward' | 'ios-skip-backward-outline' | 'ios-skip-forward' | 'ios-skip-forward-outline' | 'ios-snow' | 'ios-snow-outline' | 'ios-speedometer' | 'ios-speedometer-outline' | 'ios-square' | 'ios-square-outline' | 'ios-star' | 'ios-star-half' | 'ios-star-half-outline' | 'ios-star-outline' | 'ios-stats' | 'ios-stats-outline' | 'ios-stopwatch' | 'ios-stopwatch-outline' | 'ios-subway' | 'ios-subway-outline' | 'ios-sunny' | 'ios-sunny-outline' | 'ios-swap' | 'ios-swap-outline' | 'ios-switch' | 'ios-switch-outline' | 'ios-sync' | 'ios-sync-outline' | 'ios-tablet-landscape' | 'ios-tablet-landscape-outline' | 'ios-tablet-portrait' | 'ios-tablet-portrait-outline' | 'ios-tennisball' | 'ios-tennisball-outline' | 'ios-text' | 'ios-text-outline' | 'ios-thermometer' | 'ios-thermometer-outline' | 'ios-thumbs-down' | 'ios-thumbs-down-outline' | 'ios-thumbs-up' | 'ios-thumbs-up-outline' | 'ios-thunderstorm' | 'ios-thunderstorm-outline' | 'ios-time' | 'ios-time-outline' | 'ios-timer' | 'ios-timer-outline' | 'ios-train' | 'ios-train-outline' | 'ios-transgender' | 'ios-transgender-outline' | 'ios-trash' | 'ios-trash-outline' | 'ios-trending-down' | 'ios-trending-down-outline' | 'ios-trending-up' | 'ios-trending-up-outline' | 'ios-trophy' | 'ios-trophy-outline' | 'ios-umbrella' | 'ios-umbrella-outline' | 'ios-undo' | 'ios-undo-outline' | 'ios-unlock' | 'ios-unlock-outline' | 'ios-videocam' | 'ios-videocam-outline' | 'ios-volume-down' | 'ios-volume-down-outline' | 'ios-volume-mute' | 'ios-volume-mute-outline' | 'ios-volume-off' | 'ios-volume-off-outline' | 'ios-volume-up' | 'ios-volume-up-outline' | 'ios-walk' | 'ios-walk-outline' | 'ios-warning' | 'ios-warning-outline' | 'ios-watch' | 'ios-watch-outline' | 'ios-water' | 'ios-water-outline' | 'ios-wifi' | 'ios-wifi-outline' | 'ios-wine' | 'ios-wine-outline' | 'ios-woman' | 'ios-woman-outline' | 'logo-android' | 'logo-angular' | 'logo-apple' | 'logo-bitcoin' | 'logo-buffer' | 'logo-chrome' | 'logo-codepen' | 'logo-css3' | 'logo-designernews' | 'logo-dribbble' | 'logo-dropbox' | 'logo-euro' | 'logo-facebook' | 'logo-foursquare' | 'logo-freebsd-devil' | 'logo-github' | 'logo-google' | 'logo-googleplus' | 'logo-hackernews' | 'logo-html5' | 'logo-instagram' | 'logo-javascript' | 'logo-linkedin' | 'logo-markdown' | 'logo-nodejs' | 'logo-octocat' | 'logo-pinterest' | 'logo-playstation' | 'logo-python' | 'logo-reddit' | 'logo-rss' | 'logo-sass' | 'logo-skype' | 'logo-snapchat' | 'logo-steam' | 'logo-tumblr' | 'logo-tux' | 'logo-twitch' | 'logo-twitter' | 'logo-usd' | 'logo-vimeo' | 'logo-whatsapp' | 'logo-windows' | 'logo-wordpress' | 'logo-xbox' | 'logo-yahoo' | 'logo-yen' | 'logo-youtube' | 'md-add' | 'md-add-circle' | 'md-alarm' | 'md-albums' | 'md-alert' | 'md-american-football' | 'md-analytics' | 'md-aperture' | 'md-apps' | 'md-appstore' | 'md-archive' | 'md-arrow-back' | 'md-arrow-down' | 'md-arrow-dropdown' | 'md-arrow-dropdown-circle' | 'md-arrow-dropleft' | 'md-arrow-dropleft-circle' | 'md-arrow-dropright' | 'md-arrow-dropright-circle' | 'md-arrow-dropup' | 'md-arrow-dropup-circle' | 'md-arrow-forward' | 'md-arrow-round-back' | 'md-arrow-round-down' | 'md-arrow-round-forward' | 'md-arrow-round-up' | 'md-arrow-up' | 'md-at' | 'md-attach' | 'md-backspace' | 'md-barcode' | 'md-baseball' | 'md-basket' | 'md-basketball' | 'md-battery-charging' | 'md-battery-dead' | 'md-battery-full' | 'md-beaker' | 'md-beer' | 'md-bicycle' | 'md-bluetooth' | 'md-boat' | 'md-body' | 'md-bonfire' | 'md-book' | 'md-bookmark' | 'md-bookmarks' | 'md-bowtie' | 'md-briefcase' | 'md-browsers' | 'md-brush' | 'md-bug' | 'md-build' | 'md-bulb' | 'md-bus' | 'md-cafe' | 'md-calculator' | 'md-calendar' | 'md-call' | 'md-camera' | 'md-car' | 'md-card' | 'md-cart' | 'md-cash' | 'md-chatboxes' | 'md-chatbubbles' | 'md-checkbox' | 'md-checkbox-outline' | 'md-checkmark' | 'md-checkmark-circle' | 'md-checkmark-circle-outline' | 'md-clipboard' | 'md-clock' | 'md-close' | 'md-close-circle' | 'md-closed-captioning' | 'md-cloud' | 'md-cloud-circle' | 'md-cloud-done' | 'md-cloud-download' | 'md-cloud-outline' | 'md-cloud-upload' | 'md-cloudy' | 'md-cloudy-night' | 'md-code' | 'md-code-download' | 'md-code-working' | 'md-cog' | 'md-color-fill' | 'md-color-filter' | 'md-color-palette' | 'md-color-wand' | 'md-compass' | 'md-construct' | 'md-contact' | 'md-contacts' | 'md-contract' | 'md-contrast' | 'md-copy' | 'md-create' | 'md-crop' | 'md-cube' | 'md-cut' | 'md-desktop' | 'md-disc' | 'md-document' | 'md-done-all' | 'md-download' | 'md-easel' | 'md-egg' | 'md-exit' | 'md-expand' | 'md-eye' | 'md-eye-off' | 'md-fastforward' | 'md-female' | 'md-filing' | 'md-film' | 'md-finger-print' | 'md-flag' | 'md-flame' | 'md-flash' | 'md-flask' | 'md-flower' | 'md-folder' | 'md-folder-open' | 'md-football' | 'md-funnel' | 'md-game-controller-a' | 'md-game-controller-b' | 'md-git-branch' | 'md-git-commit' | 'md-git-compare' | 'md-git-merge' | 'md-git-network' | 'md-git-pull-request' | 'md-glasses' | 'md-globe' | 'md-grid' | 'md-hammer' | 'md-hand' | 'md-happy' | 'md-headset' | 'md-heart' | 'md-heart-outline' | 'md-help' | 'md-help-buoy' | 'md-help-circle' | 'md-home' | 'md-ice-cream' | 'md-image' | 'md-images' | 'md-infinite' | 'md-information' | 'md-information-circle' | 'md-ionic' | 'md-ionitron' | 'md-jet' | 'md-key' | 'md-keypad' | 'md-laptop' | 'md-leaf' | 'md-link' | 'md-list' | 'md-list-box' | 'md-locate' | 'md-lock' | 'md-log-in' | 'md-log-out' | 'md-magnet' | 'md-mail' | 'md-mail-open' | 'md-male' | 'md-man' | 'md-map' | 'md-medal' | 'md-medical' | 'md-medkit' | 'md-megaphone' | 'md-menu' | 'md-mic' | 'md-mic-off' | 'md-microphone' | 'md-moon' | 'md-more' | 'md-move' | 'md-musical-note' | 'md-musical-notes' | 'md-navigate' | 'md-no-smoking' | 'md-notifications' | 'md-notifications-off' | 'md-notifications-outline' | 'md-nuclear' | 'md-nutrition' | 'md-open' | 'md-options' | 'md-outlet' | 'md-paper' | 'md-paper-plane' | 'md-partly-sunny' | 'md-pause' | 'md-paw' | 'md-people' | 'md-person' | 'md-person-add' | 'md-phone-landscape' | 'md-phone-portrait' | 'md-photos' | 'md-pie' | 'md-pin' | 'md-pint' | 'md-pizza' | 'md-plane' | 'md-planet' | 'md-play' | 'md-podium' | 'md-power' | 'md-pricetag' | 'md-pricetags' | 'md-print' | 'md-pulse' | 'md-qr-scanner' | 'md-quote' | 'md-radio' | 'md-radio-button-off' | 'md-radio-button-on' | 'md-rainy' | 'md-recording' | 'md-redo' | 'md-refresh' | 'md-refresh-circle' | 'md-remove' | 'md-remove-circle' | 'md-reorder' | 'md-repeat' | 'md-resize' | 'md-restaurant' | 'md-return-left' | 'md-return-right' | 'md-reverse-camera' | 'md-rewind' | 'md-ribbon' | 'md-rose' | 'md-sad' | 'md-school' | 'md-search' | 'md-send' | 'md-settings' | 'md-share' | 'md-share-alt' | 'md-shirt' | 'md-shuffle' | 'md-skip-backward' | 'md-skip-forward' | 'md-snow' | 'md-speedometer' | 'md-square' | 'md-square-outline' | 'md-star' | 'md-star-half' | 'md-star-outline' | 'md-stats' | 'md-stopwatch' | 'md-subway' | 'md-sunny' | 'md-swap' | 'md-switch' | 'md-sync' | 'md-tablet-landscape' | 'md-tablet-portrait' | 'md-tennisball' | 'md-text' | 'md-thermometer' | 'md-thumbs-down' | 'md-thumbs-up' | 'md-thunderstorm' | 'md-time' | 'md-timer' | 'md-train' | 'md-transgender' | 'md-trash' | 'md-trending-down' | 'md-trending-up' | 'md-trophy' | 'md-umbrella' | 'md-undo' | 'md-unlock' | 'md-videocam' | 'md-volume-down' | 'md-volume-mute' | 'md-volume-off' | 'md-volume-up' | 'md-walk' | 'md-warning' | 'md-watch' | 'md-water' | 'md-wifi' | 'md-wine' | 'md-woman' - } - - interface MaterialCommunityIconsProps extends BaseIconProps { - name: 'access-point' | 'access-point-network' | 'account' | 'account-alert' | 'account-box' | 'account-box-outline' | 'account-card-details' | 'account-check' | 'account-circle' | 'account-convert' | 'account-edit' | 'account-key' | 'account-location' | 'account-minus' | 'account-multiple' | 'account-multiple-minus' | 'account-multiple-outline' | 'account-multiple-plus' | 'account-network' | 'account-off' | 'account-outline' | 'account-plus' | 'account-remove' | 'account-search' | 'account-settings' | 'account-settings-variant' | 'account-star' | 'account-switch' | 'adjust' | 'air-conditioner' | 'airballoon' | 'airplane' | 'airplane-landing' | 'airplane-off' | 'airplane-takeoff' | 'airplay' | 'alarm' | 'alarm-bell' | 'alarm-check' | 'alarm-light' | 'alarm-multiple' | 'alarm-off' | 'alarm-plus' | 'alarm-snooze' | 'album' | 'alert' | 'alert-box' | 'alert-circle' | 'alert-circle-outline' | 'alert-decagram' | 'alert-octagon' | 'alert-octagram' | 'alert-outline' | 'all-inclusive' | 'alpha' | 'alphabetical' | 'altimeter' | 'amazon' | 'amazon-clouddrive' | 'ambulance' | 'amplifier' | 'anchor' | 'android' | 'android-debug-bridge' | 'android-head' | 'android-studio' | 'angular' | 'angularjs' | 'animation' | 'apple' | 'apple-finder' | 'apple-ios' | 'apple-keyboard-caps' | 'apple-keyboard-command' | 'apple-keyboard-control' | 'apple-keyboard-option' | 'apple-keyboard-shift' | 'apple-mobileme' | 'apple-safari' | 'application' | 'approval' | 'apps' | 'archive' | 'arrange-bring-forward' | 'arrange-bring-to-front' | 'arrange-send-backward' | 'arrange-send-to-back' | 'arrow-all' | 'arrow-bottom-left' | 'arrow-bottom-right' | 'arrow-collapse' | 'arrow-collapse-all' | 'arrow-collapse-down' | 'arrow-collapse-left' | 'arrow-collapse-right' | 'arrow-collapse-up' | 'arrow-down' | 'arrow-down-bold' | 'arrow-down-bold-box' | 'arrow-down-bold-box-outline' | 'arrow-down-bold-circle' | 'arrow-down-bold-circle-outline' | 'arrow-down-bold-hexagon-outline' | 'arrow-down-box' | 'arrow-down-drop-circle' | 'arrow-down-drop-circle-outline' | 'arrow-down-thick' | 'arrow-expand' | 'arrow-expand-all' | 'arrow-expand-down' | 'arrow-expand-left' | 'arrow-expand-right' | 'arrow-expand-up' | 'arrow-left' | 'arrow-left-bold' | 'arrow-left-bold-box' | 'arrow-left-bold-box-outline' | 'arrow-left-bold-circle' | 'arrow-left-bold-circle-outline' | 'arrow-left-bold-hexagon-outline' | 'arrow-left-box' | 'arrow-left-drop-circle' | 'arrow-left-drop-circle-outline' | 'arrow-left-thick' | 'arrow-right' | 'arrow-right-bold' | 'arrow-right-bold-box' | 'arrow-right-bold-box-outline' | 'arrow-right-bold-circle' | 'arrow-right-bold-circle-outline' | 'arrow-right-bold-hexagon-outline' | 'arrow-right-box' | 'arrow-right-drop-circle' | 'arrow-right-drop-circle-outline' | 'arrow-right-thick' | 'arrow-top-left' | 'arrow-top-right' | 'arrow-up' | 'arrow-up-bold' | 'arrow-up-bold-box' | 'arrow-up-bold-box-outline' | 'arrow-up-bold-circle' | 'arrow-up-bold-circle-outline' | 'arrow-up-bold-hexagon-outline' | 'arrow-up-box' | 'arrow-up-drop-circle' | 'arrow-up-drop-circle-outline' | 'arrow-up-thick' | 'assistant' | 'asterisk' | 'at' | 'atom' | 'attachment' | 'audiobook' | 'auto-fix' | 'auto-upload' | 'autorenew' | 'av-timer' | 'baby' | 'baby-buggy' | 'backburger' | 'backspace' | 'backup-restore' | 'bandcamp' | 'bank' | 'barcode' | 'barcode-scan' | 'barley' | 'barrel' | 'basecamp' | 'basket' | 'basket-fill' | 'basket-unfill' | 'battery' | 'battery-10' | 'battery-20' | 'battery-30' | 'battery-40' | 'battery-50' | 'battery-60' | 'battery-70' | 'battery-80' | 'battery-90' | 'battery-alert' | 'battery-charging' | 'battery-charging-100' | 'battery-charging-20' | 'battery-charging-30' | 'battery-charging-40' | 'battery-charging-60' | 'battery-charging-80' | 'battery-charging-90' | 'battery-minus' | 'battery-negative' | 'battery-outline' | 'battery-plus' | 'battery-positive' | 'battery-unknown' | 'beach' | 'beaker' | 'beats' | 'beer' | 'behance' | 'bell' | 'bell-off' | 'bell-outline' | 'bell-plus' | 'bell-ring' | 'bell-ring-outline' | 'bell-sleep' | 'beta' | 'bible' | 'bike' | 'bing' | 'binoculars' | 'bio' | 'biohazard' | 'bitbucket' | 'black-mesa' | 'blackberry' | 'blender' | 'blinds' | 'block-helper' | 'blogger' | 'bluetooth' | 'bluetooth-audio' | 'bluetooth-connect' | 'bluetooth-off' | 'bluetooth-settings' | 'bluetooth-transfer' | 'blur' | 'blur-linear' | 'blur-off' | 'blur-radial' | 'bomb' | 'bomb-off' | 'bone' | 'book' | 'book-minus' | 'book-multiple' | 'book-multiple-variant' | 'book-open' | 'book-open-page-variant' | 'book-open-variant' | 'book-plus' | 'book-secure' | 'book-unsecure' | 'book-variant' | 'bookmark' | 'bookmark-check' | 'bookmark-music' | 'bookmark-outline' | 'bookmark-plus' | 'bookmark-plus-outline' | 'bookmark-remove' | 'boombox' | 'bootstrap' | 'border-all' | 'border-bottom' | 'border-color' | 'border-horizontal' | 'border-inside' | 'border-left' | 'border-none' | 'border-outside' | 'border-right' | 'border-style' | 'border-top' | 'border-vertical' | 'bow-tie' | 'bowl' | 'bowling' | 'box' | 'box-cutter' | 'box-shadow' | 'bridge' | 'briefcase' | 'briefcase-check' | 'briefcase-download' | 'briefcase-upload' | 'brightness-1' | 'brightness-2' | 'brightness-3' | 'brightness-4' | 'brightness-5' | 'brightness-6' | 'brightness-7' | 'brightness-auto' | 'broom' | 'brush' | 'buffer' | 'bug' | 'bulletin-board' | 'bullhorn' | 'bullseye' | 'burst-mode' | 'bus' | 'bus-articulated-end' | 'bus-articulated-front' | 'bus-double-decker' | 'bus-school' | 'bus-side' | 'cached' | 'cake' | 'cake-layered' | 'cake-variant' | 'calculator' | 'calendar' | 'calendar-blank' | 'calendar-check' | 'calendar-clock' | 'calendar-multiple' | 'calendar-multiple-check' | 'calendar-plus' | 'calendar-question' | 'calendar-range' | 'calendar-remove' | 'calendar-text' | 'calendar-today' | 'call-made' | 'call-merge' | 'call-missed' | 'call-received' | 'call-split' | 'camcorder' | 'camcorder-box' | 'camcorder-box-off' | 'camcorder-off' | 'camera' | 'camera-burst' | 'camera-enhance' | 'camera-front' | 'camera-front-variant' | 'camera-gopro' | 'camera-iris' | 'camera-metering-center' | 'camera-metering-matrix' | 'camera-metering-partial' | 'camera-metering-spot' | 'camera-off' | 'camera-party-mode' | 'camera-rear' | 'camera-rear-variant' | 'camera-switch' | 'camera-timer' | 'cancel' | 'candle' | 'candycane' | 'cannabis' | 'car' | 'car-battery' | 'car-connected' | 'car-convertable' | 'car-estate' | 'car-hatchback' | 'car-pickup' | 'car-side' | 'car-sports' | 'car-wash' | 'caravan' | 'cards' | 'cards-outline' | 'cards-playing-outline' | 'cards-variant' | 'carrot' | 'cart' | 'cart-off' | 'cart-outline' | 'cart-plus' | 'case-sensitive-alt' | 'cash' | 'cash-100' | 'cash-multiple' | 'cash-usd' | 'cast' | 'cast-connected' | 'cast-off' | 'castle' | 'cat' | 'cctv' | 'ceiling-light' | 'cellphone' | 'cellphone-android' | 'cellphone-basic' | 'cellphone-dock' | 'cellphone-iphone' | 'cellphone-link' | 'cellphone-link-off' | 'cellphone-settings' | 'certificate' | 'chair-school' | 'chart-arc' | 'chart-areaspline' | 'chart-bar' | 'chart-bar-stacked' | 'chart-bubble' | 'chart-donut' | 'chart-donut-variant' | 'chart-gantt' | 'chart-histogram' | 'chart-line' | 'chart-line-stacked' | 'chart-line-variant' | 'chart-pie' | 'chart-scatterplot-hexbin' | 'chart-timeline' | 'check' | 'check-all' | 'check-circle' | 'check-circle-outline' | 'checkbox-blank' | 'checkbox-blank-circle' | 'checkbox-blank-circle-outline' | 'checkbox-blank-outline' | 'checkbox-marked' | 'checkbox-marked-circle' | 'checkbox-marked-circle-outline' | 'checkbox-marked-outline' | 'checkbox-multiple-blank' | 'checkbox-multiple-blank-circle' | 'checkbox-multiple-blank-circle-outline' | 'checkbox-multiple-blank-outline' | 'checkbox-multiple-marked' | 'checkbox-multiple-marked-circle' | 'checkbox-multiple-marked-circle-outline' | 'checkbox-multiple-marked-outline' | 'checkerboard' | 'chemical-weapon' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-double-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chili-hot' | 'chili-medium' | 'chili-mild' | 'chip' | 'church' | 'circle' | 'circle-outline' | 'cisco-webex' | 'city' | 'clipboard' | 'clipboard-account' | 'clipboard-alert' | 'clipboard-arrow-down' | 'clipboard-arrow-left' | 'clipboard-check' | 'clipboard-flow' | 'clipboard-outline' | 'clipboard-plus' | 'clipboard-text' | 'clippy' | 'clock' | 'clock-alert' | 'clock-end' | 'clock-fast' | 'clock-in' | 'clock-out' | 'clock-start' | 'close' | 'close-box' | 'close-box-outline' | 'close-circle' | 'close-circle-outline' | 'close-network' | 'close-octagon' | 'close-octagon-outline' | 'close-outline' | 'closed-caption' | 'cloud' | 'cloud-braces' | 'cloud-check' | 'cloud-circle' | 'cloud-download' | 'cloud-off-outline' | 'cloud-outline' | 'cloud-print' | 'cloud-print-outline' | 'cloud-sync' | 'cloud-tags' | 'cloud-upload' | 'code-array' | 'code-braces' | 'code-brackets' | 'code-equal' | 'code-greater-than' | 'code-greater-than-or-equal' | 'code-less-than' | 'code-less-than-or-equal' | 'code-not-equal' | 'code-not-equal-variant' | 'code-parentheses' | 'code-string' | 'code-tags' | 'code-tags-check' | 'codepen' | 'coffee' | 'coffee-outline' | 'coffee-to-go' | 'coin' | 'coins' | 'collage' | 'color-helper' | 'comment' | 'comment-account' | 'comment-account-outline' | 'comment-alert' | 'comment-alert-outline' | 'comment-check' | 'comment-check-outline' | 'comment-multiple-outline' | 'comment-outline' | 'comment-plus-outline' | 'comment-processing' | 'comment-processing-outline' | 'comment-question-outline' | 'comment-remove-outline' | 'comment-text' | 'comment-text-outline' | 'compare' | 'compass' | 'compass-outline' | 'console' | 'console-line' | 'contact-mail' | 'contacts' | 'content-copy' | 'content-cut' | 'content-duplicate' | 'content-paste' | 'content-save' | 'content-save-all' | 'content-save-settings' | 'contrast' | 'contrast-box' | 'contrast-circle' | 'cookie' | 'copyright' | 'corn' | 'counter' | 'cow' | 'creation' | 'credit-card' | 'credit-card-multiple' | 'credit-card-off' | 'credit-card-plus' | 'credit-card-scan' | 'crop' | 'crop-free' | 'crop-landscape' | 'crop-portrait' | 'crop-rotate' | 'crop-square' | 'crosshairs' | 'crosshairs-gps' | 'crown' | 'cube' | 'cube-outline' | 'cube-send' | 'cube-unfolded' | 'cup' | 'cup-off' | 'cup-water' | 'currency-btc' | 'currency-chf' | 'currency-cny' | 'currency-eth' | 'currency-eur' | 'currency-gbp' | 'currency-inr' | 'currency-jpy' | 'currency-krw' | 'currency-ngn' | 'currency-rub' | 'currency-sign' | 'currency-try' | 'currency-twd' | 'currency-usd' | 'currency-usd-off' | 'cursor-default' | 'cursor-default-outline' | 'cursor-move' | 'cursor-pointer' | 'cursor-text' | 'database' | 'database-minus' | 'database-plus' | 'debug-step-into' | 'debug-step-out' | 'debug-step-over' | 'decagram' | 'decagram-outline' | 'decimal-decrease' | 'decimal-increase' | 'delete' | 'delete-circle' | 'delete-empty' | 'delete-forever' | 'delete-sweep' | 'delete-variant' | 'delta' | 'deskphone' | 'desktop-classic' | 'desktop-mac' | 'desktop-tower' | 'details' | 'developer-board' | 'deviantart' | 'dialpad' | 'diamond' | 'dice-1' | 'dice-2' | 'dice-3' | 'dice-4' | 'dice-5' | 'dice-6' | 'dice-d10' | 'dice-d20' | 'dice-d4' | 'dice-d6' | 'dice-d8' | 'dice-multiple' | 'dictionary' | 'dip-switch' | 'directions' | 'directions-fork' | 'discord' | 'disk' | 'disk-alert' | 'disqus' | 'disqus-outline' | 'division' | 'division-box' | 'dna' | 'dns' | 'do-not-disturb' | 'do-not-disturb-off' | 'dolby' | 'domain' | 'donkey' | 'dots-horizontal' | 'dots-horizontal-circle' | 'dots-vertical' | 'dots-vertical-circle' | 'douban' | 'download' | 'download-network' | 'drag' | 'drag-horizontal' | 'drag-vertical' | 'drawing' | 'drawing-box' | 'dribbble' | 'dribbble-box' | 'drone' | 'dropbox' | 'drupal' | 'duck' | 'dumbbell' | 'ear-hearing' | 'earth' | 'earth-box' | 'earth-box-off' | 'earth-off' | 'edge' | 'eject' | 'elephant' | 'elevation-decline' | 'elevation-rise' | 'elevator' | 'email' | 'email-alert' | 'email-open' | 'email-open-outline' | 'email-outline' | 'email-secure' | 'email-variant' | 'emby' | 'emoticon' | 'emoticon-cool' | 'emoticon-dead' | 'emoticon-devil' | 'emoticon-excited' | 'emoticon-happy' | 'emoticon-neutral' | 'emoticon-poop' | 'emoticon-sad' | 'emoticon-tongue' | 'engine' | 'engine-outline' | 'equal' | 'equal-box' | 'eraser' | 'eraser-variant' | 'escalator' | 'ethernet' | 'ethernet-cable' | 'ethernet-cable-off' | 'etsy' | 'ev-station' | 'eventbrite' | 'evernote' | 'exclamation' | 'exit-to-app' | 'export' | 'eye' | 'eye-off' | 'eye-off-outline' | 'eye-outline' | 'eyedropper' | 'eyedropper-variant' | 'face' | 'face-profile' | 'facebook' | 'facebook-box' | 'facebook-messenger' | 'factory' | 'fan' | 'fast-forward' | 'fast-forward-outline' | 'fax' | 'feather' | 'ferry' | 'file' | 'file-account' | 'file-chart' | 'file-check' | 'file-cloud' | 'file-delimited' | 'file-document' | 'file-document-box' | 'file-excel' | 'file-excel-box' | 'file-export' | 'file-find' | 'file-hidden' | 'file-image' | 'file-import' | 'file-lock' | 'file-multiple' | 'file-music' | 'file-outline' | 'file-pdf' | 'file-pdf-box' | 'file-plus' | 'file-powerpoint' | 'file-powerpoint-box' | 'file-presentation-box' | 'file-restore' | 'file-send' | 'file-tree' | 'file-video' | 'file-word' | 'file-word-box' | 'file-xml' | 'film' | 'filmstrip' | 'filmstrip-off' | 'filter' | 'filter-outline' | 'filter-remove' | 'filter-remove-outline' | 'filter-variant' | 'find-replace' | 'fingerprint' | 'fire' | 'firefox' | 'fish' | 'flag' | 'flag-checkered' | 'flag-outline' | 'flag-outline-variant' | 'flag-triangle' | 'flag-variant' | 'flash' | 'flash-auto' | 'flash-off' | 'flash-outline' | 'flash-red-eye' | 'flashlight' | 'flashlight-off' | 'flask' | 'flask-empty' | 'flask-empty-outline' | 'flask-outline' | 'flattr' | 'flip-to-back' | 'flip-to-front' | 'floppy' | 'flower' | 'folder' | 'folder-account' | 'folder-download' | 'folder-google-drive' | 'folder-image' | 'folder-lock' | 'folder-lock-open' | 'folder-move' | 'folder-multiple' | 'folder-multiple-image' | 'folder-multiple-outline' | 'folder-open' | 'folder-outline' | 'folder-plus' | 'folder-remove' | 'folder-star' | 'folder-upload' | 'font-awesome' | 'food' | 'food-apple' | 'food-croissant' | 'food-fork-drink' | 'food-off' | 'food-variant' | 'football' | 'football-australian' | 'football-helmet' | 'forklift' | 'format-align-bottom' | 'format-align-center' | 'format-align-justify' | 'format-align-left' | 'format-align-middle' | 'format-align-right' | 'format-align-top' | 'format-annotation-plus' | 'format-bold' | 'format-clear' | 'format-color-fill' | 'format-color-text' | 'format-float-center' | 'format-float-left' | 'format-float-none' | 'format-float-right' | 'format-font' | 'format-header-1' | 'format-header-2' | 'format-header-3' | 'format-header-4' | 'format-header-5' | 'format-header-6' | 'format-header-decrease' | 'format-header-equal' | 'format-header-increase' | 'format-header-pound' | 'format-horizontal-align-center' | 'format-horizontal-align-left' | 'format-horizontal-align-right' | 'format-indent-decrease' | 'format-indent-increase' | 'format-italic' | 'format-line-spacing' | 'format-line-style' | 'format-line-weight' | 'format-list-bulleted' | 'format-list-bulleted-type' | 'format-list-checks' | 'format-list-numbers' | 'format-page-break' | 'format-paint' | 'format-paragraph' | 'format-pilcrow' | 'format-quote-close' | 'format-quote-open' | 'format-rotate-90' | 'format-section' | 'format-size' | 'format-strikethrough' | 'format-strikethrough-variant' | 'format-subscript' | 'format-superscript' | 'format-text' | 'format-textdirection-l-to-r' | 'format-textdirection-r-to-l' | 'format-title' | 'format-underline' | 'format-vertical-align-bottom' | 'format-vertical-align-center' | 'format-vertical-align-top' | 'format-wrap-inline' | 'format-wrap-square' | 'format-wrap-tight' | 'format-wrap-top-bottom' | 'forum' | 'forward' | 'foursquare' | 'fridge' | 'fridge-filled' | 'fridge-filled-bottom' | 'fridge-filled-top' | 'fuel' | 'fullscreen' | 'fullscreen-exit' | 'function' | 'gamepad' | 'gamepad-variant' | 'garage' | 'garage-open' | 'gas-cylinder' | 'gas-station' | 'gate' | 'gauge' | 'gavel' | 'gender-female' | 'gender-male' | 'gender-male-female' | 'gender-transgender' | 'gesture' | 'gesture-double-tap' | 'gesture-swipe-down' | 'gesture-swipe-left' | 'gesture-swipe-right' | 'gesture-swipe-up' | 'gesture-tap' | 'gesture-two-double-tap' | 'gesture-two-tap' | 'ghost' | 'gift' | 'git' | 'github-box' | 'github-circle' | 'github-face' | 'glass-flute' | 'glass-mug' | 'glass-stange' | 'glass-tulip' | 'glassdoor' | 'glasses' | 'gmail' | 'gnome' | 'gondola' | 'google' | 'google-analytics' | 'google-assistant' | 'google-cardboard' | 'google-chrome' | 'google-circles' | 'google-circles-communities' | 'google-circles-extended' | 'google-circles-group' | 'google-controller' | 'google-controller-off' | 'google-drive' | 'google-earth' | 'google-glass' | 'google-keep' | 'google-maps' | 'google-nearby' | 'google-pages' | 'google-photos' | 'google-physical-web' | 'google-play' | 'google-plus' | 'google-plus-box' | 'google-translate' | 'google-wallet' | 'gradient' | 'grease-pencil' | 'grid' | 'grid-large' | 'grid-off' | 'group' | 'guitar-acoustic' | 'guitar-electric' | 'guitar-pick' | 'guitar-pick-outline' | 'hackernews' | 'hamburger' | 'hand-pointing-right' | 'hanger' | 'hangouts' | 'harddisk' | 'headphones' | 'headphones-box' | 'headphones-off' | 'headphones-settings' | 'headset' | 'headset-dock' | 'headset-off' | 'heart' | 'heart-box' | 'heart-box-outline' | 'heart-broken' | 'heart-half' | 'heart-half-full' | 'heart-half-outline' | 'heart-off' | 'heart-outline' | 'heart-pulse' | 'help' | 'help-box' | 'help-circle' | 'help-circle-outline' | 'help-network' | 'hexagon' | 'hexagon-multiple' | 'hexagon-outline' | 'high-definition' | 'highway' | 'history' | 'hololens' | 'home' | 'home-assistant' | 'home-automation' | 'home-circle' | 'home-map-marker' | 'home-modern' | 'home-outline' | 'home-variant' | 'hook' | 'hook-off' | 'hops' | 'hospital' | 'hospital-building' | 'hospital-marker' | 'hotel' | 'houzz' | 'houzz-box' | 'human' | 'human-child' | 'human-female' | 'human-greeting' | 'human-handsdown' | 'human-handsup' | 'human-male' | 'human-male-female' | 'human-pregnant' | 'humble-bundle' | 'image' | 'image-album' | 'image-area' | 'image-area-close' | 'image-broken' | 'image-broken-variant' | 'image-filter' | 'image-filter-black-white' | 'image-filter-center-focus' | 'image-filter-center-focus-weak' | 'image-filter-drama' | 'image-filter-frames' | 'image-filter-hdr' | 'image-filter-none' | 'image-filter-tilt-shift' | 'image-filter-vintage' | 'image-multiple' | 'import' | 'inbox' | 'inbox-arrow-down' | 'inbox-arrow-up' | 'incognito' | 'infinity' | 'information' | 'information-outline' | 'information-variant' | 'instagram' | 'instapaper' | 'internet-explorer' | 'invert-colors' | 'itunes' | 'jeepney' | 'jira' | 'jsfiddle' | 'json' | 'keg' | 'kettle' | 'key' | 'key-change' | 'key-minus' | 'key-plus' | 'key-remove' | 'key-variant' | 'keyboard' | 'keyboard-backspace' | 'keyboard-caps' | 'keyboard-close' | 'keyboard-off' | 'keyboard-return' | 'keyboard-tab' | 'keyboard-variant' | 'kickstarter' | 'kodi' | 'label' | 'label-outline' | 'lambda' | 'lamp' | 'lan' | 'lan-connect' | 'lan-disconnect' | 'lan-pending' | 'language-c' | 'language-cpp' | 'language-csharp' | 'language-css3' | 'language-go' | 'language-html5' | 'language-javascript' | 'language-php' | 'language-python' | 'language-python-text' | 'language-r' | 'language-swift' | 'language-typescript' | 'laptop' | 'laptop-chromebook' | 'laptop-mac' | 'laptop-off' | 'laptop-windows' | 'lastfm' | 'launch' | 'lava-lamp' | 'layers' | 'layers-off' | 'lead-pencil' | 'leaf' | 'led-off' | 'led-on' | 'led-outline' | 'led-strip' | 'led-variant-off' | 'led-variant-on' | 'led-variant-outline' | 'library' | 'library-books' | 'library-music' | 'library-plus' | 'lightbulb' | 'lightbulb-on' | 'lightbulb-on-outline' | 'lightbulb-outline' | 'link' | 'link-off' | 'link-variant' | 'link-variant-off' | 'linkedin' | 'linkedin-box' | 'linux' | 'loading' | 'lock' | 'lock-open' | 'lock-open-outline' | 'lock-outline' | 'lock-pattern' | 'lock-plus' | 'lock-reset' | 'locker' | 'locker-multiple' | 'login' | 'login-variant' | 'logout' | 'logout-variant' | 'looks' | 'loop' | 'loupe' | 'lumx' | 'magnet' | 'magnet-on' | 'magnify' | 'magnify-minus' | 'magnify-minus-outline' | 'magnify-plus' | 'magnify-plus-outline' | 'mail-ru' | 'mailbox' | 'map' | 'map-marker' | 'map-marker-circle' | 'map-marker-minus' | 'map-marker-multiple' | 'map-marker-off' | 'map-marker-outline' | 'map-marker-plus' | 'map-marker-radius' | 'margin' | 'markdown' | 'marker' | 'marker-check' | 'martini' | 'material-ui' | 'math-compass' | 'matrix' | 'maxcdn' | 'medical-bag' | 'medium' | 'memory' | 'menu' | 'menu-down' | 'menu-down-outline' | 'menu-left' | 'menu-right' | 'menu-up' | 'menu-up-outline' | 'message' | 'message-alert' | 'message-bulleted' | 'message-bulleted-off' | 'message-draw' | 'message-image' | 'message-outline' | 'message-plus' | 'message-processing' | 'message-reply' | 'message-reply-text' | 'message-settings' | 'message-settings-variant' | 'message-text' | 'message-text-outline' | 'message-video' | 'meteor' | 'metronome' | 'metronome-tick' | 'micro-sd' | 'microphone' | 'microphone-off' | 'microphone-outline' | 'microphone-settings' | 'microphone-variant' | 'microphone-variant-off' | 'microscope' | 'microsoft' | 'minecraft' | 'minus' | 'minus-box' | 'minus-box-outline' | 'minus-circle' | 'minus-circle-outline' | 'minus-network' | 'mixcloud' | 'mixer' | 'monitor' | 'monitor-multiple' | 'more' | 'motorbike' | 'mouse' | 'mouse-off' | 'mouse-variant' | 'mouse-variant-off' | 'move-resize' | 'move-resize-variant' | 'movie' | 'movie-roll' | 'multiplication' | 'multiplication-box' | 'mushroom' | 'mushroom-outline' | 'music' | 'music-box' | 'music-box-outline' | 'music-circle' | 'music-note' | 'music-note-bluetooth' | 'music-note-bluetooth-off' | 'music-note-eighth' | 'music-note-half' | 'music-note-off' | 'music-note-quarter' | 'music-note-sixteenth' | 'music-note-whole' | 'music-off' | 'nature' | 'nature-people' | 'navigation' | 'near-me' | 'needle' | 'nest-protect' | 'nest-thermostat' | 'netflix' | 'network' | 'new-box' | 'newspaper' | 'nfc' | 'nfc-tap' | 'nfc-variant' | 'ninja' | 'nintendo-switch' | 'nodejs' | 'note' | 'note-multiple' | 'note-multiple-outline' | 'note-outline' | 'note-plus' | 'note-plus-outline' | 'note-text' | 'notification-clear-all' | 'npm' | 'nuke' | 'null' | 'numeric' | 'numeric-0-box' | 'numeric-0-box-multiple-outline' | 'numeric-0-box-outline' | 'numeric-1-box' | 'numeric-1-box-multiple-outline' | 'numeric-1-box-outline' | 'numeric-2-box' | 'numeric-2-box-multiple-outline' | 'numeric-2-box-outline' | 'numeric-3-box' | 'numeric-3-box-multiple-outline' | 'numeric-3-box-outline' | 'numeric-4-box' | 'numeric-4-box-multiple-outline' | 'numeric-4-box-outline' | 'numeric-5-box' | 'numeric-5-box-multiple-outline' | 'numeric-5-box-outline' | 'numeric-6-box' | 'numeric-6-box-multiple-outline' | 'numeric-6-box-outline' | 'numeric-7-box' | 'numeric-7-box-multiple-outline' | 'numeric-7-box-outline' | 'numeric-8-box' | 'numeric-8-box-multiple-outline' | 'numeric-8-box-outline' | 'numeric-9-box' | 'numeric-9-box-multiple-outline' | 'numeric-9-box-outline' | 'numeric-9-plus-box' | 'numeric-9-plus-box-multiple-outline' | 'numeric-9-plus-box-outline' | 'nut' | 'nutrition' | 'oar' | 'octagon' | 'octagon-outline' | 'octagram' | 'octagram-outline' | 'odnoklassniki' | 'office' | 'oil' | 'oil-temperature' | 'omega' | 'onedrive' | 'onenote' | 'opacity' | 'open-in-app' | 'open-in-new' | 'openid' | 'opera' | 'orbit' | 'ornament' | 'ornament-variant' | 'owl' | 'package' | 'package-down' | 'package-up' | 'package-variant' | 'package-variant-closed' | 'page-first' | 'page-last' | 'page-layout-body' | 'page-layout-footer' | 'page-layout-header' | 'page-layout-sidebar-left' | 'page-layout-sidebar-right' | 'palette' | 'palette-advanced' | 'panda' | 'pandora' | 'panorama' | 'panorama-fisheye' | 'panorama-horizontal' | 'panorama-vertical' | 'panorama-wide-angle' | 'paper-cut-vertical' | 'paperclip' | 'parking' | 'passport' | 'pause' | 'pause-circle' | 'pause-circle-outline' | 'pause-octagon' | 'pause-octagon-outline' | 'paw' | 'paw-off' | 'pen' | 'pencil' | 'pencil-box' | 'pencil-box-outline' | 'pencil-circle' | 'pencil-circle-outline' | 'pencil-lock' | 'pencil-off' | 'pentagon' | 'pentagon-outline' | 'percent' | 'periodic-table-co2' | 'periscope' | 'pharmacy' | 'phone' | 'phone-bluetooth' | 'phone-classic' | 'phone-forward' | 'phone-hangup' | 'phone-in-talk' | 'phone-incoming' | 'phone-locked' | 'phone-log' | 'phone-minus' | 'phone-missed' | 'phone-outgoing' | 'phone-paused' | 'phone-plus' | 'phone-settings' | 'phone-voip' | 'pi' | 'pi-box' | 'piano' | 'pig' | 'pill' | 'pillar' | 'pin' | 'pin-off' | 'pine-tree' | 'pine-tree-box' | 'pinterest' | 'pinterest-box' | 'pipe' | 'pipe-disconnected' | 'pistol' | 'pizza' | 'plane-shield' | 'play' | 'play-box-outline' | 'play-circle' | 'play-circle-outline' | 'play-pause' | 'play-protected-content' | 'playlist-check' | 'playlist-minus' | 'playlist-play' | 'playlist-plus' | 'playlist-remove' | 'playstation' | 'plex' | 'plus' | 'plus-box' | 'plus-box-outline' | 'plus-circle' | 'plus-circle-multiple-outline' | 'plus-circle-outline' | 'plus-network' | 'plus-one' | 'plus-outline' | 'pocket' | 'pokeball' | 'polaroid' | 'poll' | 'poll-box' | 'polymer' | 'pool' | 'popcorn' | 'pot' | 'pot-mix' | 'pound' | 'pound-box' | 'power' | 'power-plug' | 'power-plug-off' | 'power-settings' | 'power-socket' | 'power-socket-eu' | 'power-socket-uk' | 'power-socket-us' | 'prescription' | 'presentation' | 'presentation-play' | 'printer' | 'printer-3d' | 'printer-alert' | 'printer-settings' | 'priority-high' | 'priority-low' | 'professional-hexagon' | 'projector' | 'projector-screen' | 'publish' | 'pulse' | 'puzzle' | 'qqchat' | 'qrcode' | 'qrcode-scan' | 'quadcopter' | 'quality-high' | 'quicktime' | 'radar' | 'radiator' | 'radio' | 'radio-handheld' | 'radio-tower' | 'radioactive' | 'radiobox-blank' | 'radiobox-marked' | 'raspberrypi' | 'ray-end' | 'ray-end-arrow' | 'ray-start' | 'ray-start-arrow' | 'ray-start-end' | 'ray-vertex' | 'rdio' | 'react' | 'read' | 'readability' | 'receipt' | 'record' | 'record-rec' | 'recycle' | 'reddit' | 'redo' | 'redo-variant' | 'refresh' | 'regex' | 'relative-scale' | 'reload' | 'remote' | 'rename-box' | 'reorder-horizontal' | 'reorder-vertical' | 'repeat' | 'repeat-off' | 'repeat-once' | 'replay' | 'reply' | 'reply-all' | 'reproduction' | 'resize-bottom-right' | 'responsive' | 'restart' | 'restore' | 'rewind' | 'rewind-outline' | 'rhombus' | 'rhombus-outline' | 'ribbon' | 'rice' | 'ring' | 'road' | 'road-variant' | 'robot' | 'rocket' | 'roomba' | 'rotate-3d' | 'rotate-left' | 'rotate-left-variant' | 'rotate-right' | 'rotate-right-variant' | 'rounded-corner' | 'router-wireless' | 'routes' | 'rowing' | 'rss' | 'rss-box' | 'ruler' | 'run' | 'run-fast' | 'sale' | 'sass' | 'satellite' | 'satellite-variant' | 'saxophone' | 'scale' | 'scale-balance' | 'scale-bathroom' | 'scanner' | 'school' | 'screen-rotation' | 'screen-rotation-lock' | 'screwdriver' | 'script' | 'sd' | 'seal' | 'search-web' | 'seat-flat' | 'seat-flat-angled' | 'seat-individual-suite' | 'seat-legroom-extra' | 'seat-legroom-normal' | 'seat-legroom-reduced' | 'seat-recline-extra' | 'seat-recline-normal' | 'security' | 'security-home' | 'security-network' | 'select' | 'select-all' | 'select-inverse' | 'select-off' | 'selection' | 'selection-off' | 'send' | 'send-secure' | 'serial-port' | 'server' | 'server-minus' | 'server-network' | 'server-network-off' | 'server-off' | 'server-plus' | 'server-remove' | 'server-security' | 'set-all' | 'set-center' | 'set-center-right' | 'set-left' | 'set-left-center' | 'set-left-right' | 'set-none' | 'set-right' | 'settings' | 'settings-box' | 'shape-circle-plus' | 'shape-plus' | 'shape-polygon-plus' | 'shape-rectangle-plus' | 'shape-square-plus' | 'share' | 'share-variant' | 'shield' | 'shield-half-full' | 'shield-outline' | 'shopping' | 'shopping-music' | 'shovel' | 'shovel-off' | 'shredder' | 'shuffle' | 'shuffle-disabled' | 'shuffle-variant' | 'sigma' | 'sigma-lower' | 'sign-caution' | 'sign-direction' | 'sign-text' | 'signal' | 'signal-2g' | 'signal-3g' | 'signal-4g' | 'signal-hspa' | 'signal-hspa-plus' | 'signal-off' | 'signal-variant' | 'silverware' | 'silverware-fork' | 'silverware-spoon' | 'silverware-variant' | 'sim' | 'sim-alert' | 'sim-off' | 'sitemap' | 'skip-backward' | 'skip-forward' | 'skip-next' | 'skip-next-circle' | 'skip-next-circle-outline' | 'skip-previous' | 'skip-previous-circle' | 'skip-previous-circle-outline' | 'skull' | 'skype' | 'skype-business' | 'slack' | 'sleep' | 'sleep-off' | 'smoking' | 'smoking-off' | 'snapchat' | 'snowflake' | 'snowman' | 'soccer' | 'sofa' | 'solid' | 'sort' | 'sort-alphabetical' | 'sort-ascending' | 'sort-descending' | 'sort-numeric' | 'sort-variant' | 'soundcloud' | 'source-branch' | 'source-commit' | 'source-commit-end' | 'source-commit-end-local' | 'source-commit-local' | 'source-commit-next-local' | 'source-commit-start' | 'source-commit-start-next-local' | 'source-fork' | 'source-merge' | 'source-pull' | 'soy-sauce' | 'speaker' | 'speaker-off' | 'speaker-wireless' | 'speedometer' | 'spellcheck' | 'spotify' | 'spotlight' | 'spotlight-beam' | 'spray' | 'square' | 'square-inc' | 'square-inc-cash' | 'square-outline' | 'square-root' | 'stackexchange' | 'stackoverflow' | 'stadium' | 'stairs' | 'standard-definition' | 'star' | 'star-circle' | 'star-half' | 'star-off' | 'star-outline' | 'steam' | 'steering' | 'step-backward' | 'step-backward-2' | 'step-forward' | 'step-forward-2' | 'stethoscope' | 'sticker' | 'sticker-emoji' | 'stocking' | 'stop' | 'stop-circle' | 'stop-circle-outline' | 'store' | 'store-24-hour' | 'stove' | 'subdirectory-arrow-left' | 'subdirectory-arrow-right' | 'subway' | 'subway-variant' | 'summit' | 'sunglasses' | 'surround-sound' | 'surround-sound-2-0' | 'surround-sound-3-1' | 'surround-sound-5-1' | 'surround-sound-7-1' | 'svg' | 'swap-horizontal' | 'swap-vertical' | 'swim' | 'switch' | 'sword' | 'sword-cross' | 'sync' | 'sync-alert' | 'sync-off' | 'tab' | 'tab-plus' | 'tab-unselected' | 'table' | 'table-column-plus-after' | 'table-column-plus-before' | 'table-column-remove' | 'table-column-width' | 'table-edit' | 'table-large' | 'table-row-height' | 'table-row-plus-after' | 'table-row-plus-before' | 'table-row-remove' | 'tablet' | 'tablet-android' | 'tablet-ipad' | 'taco' | 'tag' | 'tag-faces' | 'tag-heart' | 'tag-multiple' | 'tag-outline' | 'tag-plus' | 'tag-remove' | 'tag-text-outline' | 'target' | 'taxi' | 'teamviewer' | 'telegram' | 'television' | 'television-classic' | 'television-guide' | 'temperature-celsius' | 'temperature-fahrenheit' | 'temperature-kelvin' | 'tennis' | 'tent' | 'terrain' | 'test-tube' | 'text-shadow' | 'text-to-speech' | 'text-to-speech-off' | 'textbox' | 'textbox-password' | 'texture' | 'theater' | 'theme-light-dark' | 'thermometer' | 'thermometer-lines' | 'thought-bubble' | 'thought-bubble-outline' | 'thumb-down' | 'thumb-down-outline' | 'thumb-up' | 'thumb-up-outline' | 'thumbs-up-down' | 'ticket' | 'ticket-account' | 'ticket-confirmation' | 'ticket-percent' | 'tie' | 'tilde' | 'timelapse' | 'timer' | 'timer-10' | 'timer-3' | 'timer-off' | 'timer-sand' | 'timer-sand-empty' | 'timer-sand-full' | 'timetable' | 'toggle-switch' | 'toggle-switch-off' | 'tooltip' | 'tooltip-edit' | 'tooltip-image' | 'tooltip-outline' | 'tooltip-outline-plus' | 'tooltip-text' | 'tooth' | 'tor' | 'tower-beach' | 'tower-fire' | 'trackpad' | 'traffic-light' | 'train' | 'tram' | 'transcribe' | 'transcribe-close' | 'transfer' | 'transit-transfer' | 'translate' | 'treasure-chest' | 'tree' | 'trello' | 'trending-down' | 'trending-neutral' | 'trending-up' | 'triangle' | 'triangle-outline' | 'trophy' | 'trophy-award' | 'trophy-outline' | 'trophy-variant' | 'trophy-variant-outline' | 'truck' | 'truck-delivery' | 'truck-fast' | 'truck-trailer' | 'tshirt-crew' | 'tshirt-v' | 'tumblr' | 'tumblr-reblog' | 'tune' | 'tune-vertical' | 'twitch' | 'twitter' | 'twitter-box' | 'twitter-circle' | 'twitter-retweet' | 'uber' | 'ubuntu' | 'ultra-high-definition' | 'umbraco' | 'umbrella' | 'umbrella-outline' | 'undo' | 'undo-variant' | 'unfold-less-horizontal' | 'unfold-less-vertical' | 'unfold-more-horizontal' | 'unfold-more-vertical' | 'ungroup' | 'unity' | 'untappd' | 'update' | 'upload' | 'upload-network' | 'usb' | 'van-passenger' | 'van-utility' | 'vanish' | 'vector-arrange-above' | 'vector-arrange-below' | 'vector-circle' | 'vector-circle-variant' | 'vector-combine' | 'vector-curve' | 'vector-difference' | 'vector-difference-ab' | 'vector-difference-ba' | 'vector-intersection' | 'vector-line' | 'vector-point' | 'vector-polygon' | 'vector-polyline' | 'vector-radius' | 'vector-rectangle' | 'vector-selection' | 'vector-square' | 'vector-triangle' | 'vector-union' | 'verified' | 'vibrate' | 'video' | 'video-3d' | 'video-off' | 'video-switch' | 'view-agenda' | 'view-array' | 'view-carousel' | 'view-column' | 'view-dashboard' | 'view-day' | 'view-grid' | 'view-headline' | 'view-list' | 'view-module' | 'view-parallel' | 'view-quilt' | 'view-sequential' | 'view-stream' | 'view-week' | 'vimeo' | 'vine' | 'violin' | 'visualstudio' | 'vk' | 'vk-box' | 'vk-circle' | 'vlc' | 'voice' | 'voicemail' | 'volume-high' | 'volume-low' | 'volume-medium' | 'volume-minus' | 'volume-mute' | 'volume-off' | 'volume-plus' | 'vpn' | 'walk' | 'wall' | 'wallet' | 'wallet-giftcard' | 'wallet-membership' | 'wallet-travel' | 'wan' | 'washing-machine' | 'watch' | 'watch-export' | 'watch-import' | 'watch-vibrate' | 'water' | 'water-off' | 'water-percent' | 'water-pump' | 'watermark' | 'waves' | 'weather-cloudy' | 'weather-fog' | 'weather-hail' | 'weather-lightning' | 'weather-lightning-rainy' | 'weather-night' | 'weather-partlycloudy' | 'weather-pouring' | 'weather-rainy' | 'weather-snowy' | 'weather-snowy-rainy' | 'weather-sunny' | 'weather-sunset' | 'weather-sunset-down' | 'weather-sunset-up' | 'weather-windy' | 'weather-windy-variant' | 'web' | 'webcam' | 'webhook' | 'webpack' | 'wechat' | 'weight' | 'weight-kilogram' | 'whatsapp' | 'wheelchair-accessibility' | 'white-balance-auto' | 'white-balance-incandescent' | 'white-balance-iridescent' | 'white-balance-sunny' | 'widgets' | 'wifi' | 'wifi-off' | 'wii' | 'wiiu' | 'wikipedia' | 'window-close' | 'window-closed' | 'window-maximize' | 'window-minimize' | 'window-open' | 'window-restore' | 'windows' | 'wordpress' | 'worker' | 'wrap' | 'wrench' | 'wunderlist' | 'xaml' | 'xbox' | 'xbox-controller' | 'xbox-controller-battery-alert' | 'xbox-controller-battery-empty' | 'xbox-controller-battery-full' | 'xbox-controller-battery-low' | 'xbox-controller-battery-medium' | 'xbox-controller-battery-unknown' | 'xbox-controller-off' | 'xda' | 'xing' | 'xing-box' | 'xing-circle' | 'xml' | 'xmpp' | 'yammer' | 'yeast' | 'yelp' | 'yin-yang' | 'youtube-play' | 'zip-box' | 'blank' - } - - interface MaterialIconsProps extends BaseIconProps { - name: '3d-rotation' | 'ac-unit' | 'access-alarm' | 'access-alarms' | 'access-time' | 'accessibility' | 'accessible' | 'account-balance' | 'account-balance-wallet' | 'account-box' | 'account-circle' | 'adb' | 'add' | 'add-a-photo' | 'add-alarm' | 'add-alert' | 'add-box' | 'add-circle' | 'add-circle-outline' | 'add-location' | 'add-shopping-cart' | 'add-to-photos' | 'add-to-queue' | 'adjust' | 'airline-seat-flat' | 'airline-seat-flat-angled' | 'airline-seat-individual-suite' | 'airline-seat-legroom-extra' | 'airline-seat-legroom-normal' | 'airline-seat-legroom-reduced' | 'airline-seat-recline-extra' | 'airline-seat-recline-normal' | 'airplanemode-active' | 'airplanemode-inactive' | 'airplay' | 'airport-shuttle' | 'alarm' | 'alarm-add' | 'alarm-off' | 'alarm-on' | 'album' | 'all-inclusive' | 'all-out' | 'android' | 'announcement' | 'apps' | 'archive' | 'arrow-back' | 'arrow-downward' | 'arrow-drop-down' | 'arrow-drop-down-circle' | 'arrow-drop-up' | 'arrow-forward' | 'arrow-upward' | 'art-track' | 'aspect-ratio' | 'assessment' | 'assignment' | 'assignment-ind' | 'assignment-late' | 'assignment-return' | 'assignment-returned' | 'assignment-turned-in' | 'assistant' | 'assistant-photo' | 'attach-file' | 'attach-money' | 'attachment' | 'audiotrack' | 'autorenew' | 'av-timer' | 'backspace' | 'backup' | 'battery-alert' | 'battery-charging-full' | 'battery-full' | 'battery-std' | 'battery-unknown' | 'beach-access' | 'beenhere' | 'block' | 'bluetooth' | 'bluetooth-audio' | 'bluetooth-connected' | 'bluetooth-disabled' | 'bluetooth-searching' | 'blur-circular' | 'blur-linear' | 'blur-off' | 'blur-on' | 'book' | 'bookmark' | 'bookmark-border' | 'border-all' | 'border-bottom' | 'border-clear' | 'border-color' | 'border-horizontal' | 'border-inner' | 'border-left' | 'border-outer' | 'border-right' | 'border-style' | 'border-top' | 'border-vertical' | 'branding-watermark' | 'brightness-1' | 'brightness-2' | 'brightness-3' | 'brightness-4' | 'brightness-5' | 'brightness-6' | 'brightness-7' | 'brightness-auto' | 'brightness-high' | 'brightness-low' | 'brightness-medium' | 'broken-image' | 'brush' | 'bubble-chart' | 'bug-report' | 'build' | 'burst-mode' | 'business' | 'business-center' | 'cached' | 'cake' | 'call' | 'call-end' | 'call-made' | 'call-merge' | 'call-missed' | 'call-missed-outgoing' | 'call-received' | 'call-split' | 'call-to-action' | 'camera' | 'camera-alt' | 'camera-enhance' | 'camera-front' | 'camera-rear' | 'camera-roll' | 'cancel' | 'card-giftcard' | 'card-membership' | 'card-travel' | 'casino' | 'cast' | 'cast-connected' | 'center-focus-strong' | 'center-focus-weak' | 'change-history' | 'chat' | 'chat-bubble' | 'chat-bubble-outline' | 'check' | 'check-box' | 'check-box-outline-blank' | 'check-circle' | 'chevron-left' | 'chevron-right' | 'child-care' | 'child-friendly' | 'chrome-reader-mode' | 'class' | 'clear' | 'clear-all' | 'close' | 'closed-caption' | 'cloud' | 'cloud-circle' | 'cloud-done' | 'cloud-download' | 'cloud-off' | 'cloud-queue' | 'cloud-upload' | 'code' | 'collections' | 'collections-bookmark' | 'color-lens' | 'colorize' | 'comment' | 'compare' | 'compare-arrows' | 'computer' | 'confirmation-number' | 'contact-mail' | 'contact-phone' | 'contacts' | 'content-copy' | 'content-cut' | 'content-paste' | 'control-point' | 'control-point-duplicate' | 'copyright' | 'create' | 'create-new-folder' | 'credit-card' | 'crop' | 'crop-16-9' | 'crop-3-2' | 'crop-5-4' | 'crop-7-5' | 'crop-din' | 'crop-free' | 'crop-landscape' | 'crop-original' | 'crop-portrait' | 'crop-rotate' | 'crop-square' | 'dashboard' | 'data-usage' | 'date-range' | 'dehaze' | 'delete' | 'delete-forever' | 'delete-sweep' | 'description' | 'desktop-mac' | 'desktop-windows' | 'details' | 'developer-board' | 'developer-mode' | 'device-hub' | 'devices' | 'devices-other' | 'dialer-sip' | 'dialpad' | 'directions' | 'directions-bike' | 'directions-boat' | 'directions-bus' | 'directions-car' | 'directions-railway' | 'directions-run' | 'directions-subway' | 'directions-transit' | 'directions-walk' | 'disc-full' | 'dns' | 'do-not-disturb' | 'do-not-disturb-alt' | 'do-not-disturb-off' | 'do-not-disturb-on' | 'dock' | 'domain' | 'done' | 'done-all' | 'donut-large' | 'donut-small' | 'drafts' | 'drag-handle' | 'drive-eta' | 'dvr' | 'edit' | 'edit-location' | 'eject' | 'email' | 'enhanced-encryption' | 'equalizer' | 'error' | 'error-outline' | 'euro-symbol' | 'ev-station' | 'event' | 'event-available' | 'event-busy' | 'event-note' | 'event-seat' | 'exit-to-app' | 'expand-less' | 'expand-more' | 'explicit' | 'explore' | 'exposure' | 'exposure-neg-1' | 'exposure-neg-2' | 'exposure-plus-1' | 'exposure-plus-2' | 'exposure-zero' | 'extension' | 'face' | 'fast-forward' | 'fast-rewind' | 'favorite' | 'favorite-border' | 'featured-play-list' | 'featured-video' | 'feedback' | 'fiber-dvr' | 'fiber-manual-record' | 'fiber-new' | 'fiber-pin' | 'fiber-smart-record' | 'file-download' | 'file-upload' | 'filter' | 'filter-1' | 'filter-2' | 'filter-3' | 'filter-4' | 'filter-5' | 'filter-6' | 'filter-7' | 'filter-8' | 'filter-9' | 'filter-9-plus' | 'filter-b-and-w' | 'filter-center-focus' | 'filter-drama' | 'filter-frames' | 'filter-hdr' | 'filter-list' | 'filter-none' | 'filter-tilt-shift' | 'filter-vintage' | 'find-in-page' | 'find-replace' | 'fingerprint' | 'first-page' | 'fitness-center' | 'flag' | 'flare' | 'flash-auto' | 'flash-off' | 'flash-on' | 'flight' | 'flight-land' | 'flight-takeoff' | 'flip' | 'flip-to-back' | 'flip-to-front' | 'folder' | 'folder-open' | 'folder-shared' | 'folder-special' | 'font-download' | 'format-align-center' | 'format-align-justify' | 'format-align-left' | 'format-align-right' | 'format-bold' | 'format-clear' | 'format-color-fill' | 'format-color-reset' | 'format-color-text' | 'format-indent-decrease' | 'format-indent-increase' | 'format-italic' | 'format-line-spacing' | 'format-list-bulleted' | 'format-list-numbered' | 'format-paint' | 'format-quote' | 'format-shapes' | 'format-size' | 'format-strikethrough' | 'format-textdirection-l-to-r' | 'format-textdirection-r-to-l' | 'format-underlined' | 'forum' | 'forward' | 'forward-10' | 'forward-30' | 'forward-5' | 'free-breakfast' | 'fullscreen' | 'fullscreen-exit' | 'functions' | 'g-translate' | 'gamepad' | 'games' | 'gavel' | 'gesture' | 'get-app' | 'gif' | 'golf-course' | 'gps-fixed' | 'gps-not-fixed' | 'gps-off' | 'grade' | 'gradient' | 'grain' | 'graphic-eq' | 'grid-off' | 'grid-on' | 'group' | 'group-add' | 'group-work' | 'hd' | 'hdr-off' | 'hdr-on' | 'hdr-strong' | 'hdr-weak' | 'headset' | 'headset-mic' | 'healing' | 'hearing' | 'help' | 'help-outline' | 'high-quality' | 'highlight' | 'highlight-off' | 'history' | 'home' | 'hot-tub' | 'hotel' | 'hourglass-empty' | 'hourglass-full' | 'http' | 'https' | 'image' | 'image-aspect-ratio' | 'import-contacts' | 'import-export' | 'important-devices' | 'inbox' | 'indeterminate-check-box' | 'info' | 'info-outline' | 'input' | 'insert-chart' | 'insert-comment' | 'insert-drive-file' | 'insert-emoticon' | 'insert-invitation' | 'insert-link' | 'insert-photo' | 'invert-colors' | 'invert-colors-off' | 'iso' | 'keyboard' | 'keyboard-arrow-down' | 'keyboard-arrow-left' | 'keyboard-arrow-right' | 'keyboard-arrow-up' | 'keyboard-backspace' | 'keyboard-capslock' | 'keyboard-hide' | 'keyboard-return' | 'keyboard-tab' | 'keyboard-voice' | 'kitchen' | 'label' | 'label-outline' | 'landscape' | 'language' | 'laptop' | 'laptop-chromebook' | 'laptop-mac' | 'laptop-windows' | 'last-page' | 'launch' | 'layers' | 'layers-clear' | 'leak-add' | 'leak-remove' | 'lens' | 'library-add' | 'library-books' | 'library-music' | 'lightbulb-outline' | 'line-style' | 'line-weight' | 'linear-scale' | 'link' | 'linked-camera' | 'list' | 'live-help' | 'live-tv' | 'local-activity' | 'local-airport' | 'local-atm' | 'local-bar' | 'local-cafe' | 'local-car-wash' | 'local-convenience-store' | 'local-dining' | 'local-drink' | 'local-florist' | 'local-gas-station' | 'local-grocery-store' | 'local-hospital' | 'local-hotel' | 'local-laundry-service' | 'local-library' | 'local-mall' | 'local-movies' | 'local-offer' | 'local-parking' | 'local-pharmacy' | 'local-phone' | 'local-pizza' | 'local-play' | 'local-post-office' | 'local-printshop' | 'local-see' | 'local-shipping' | 'local-taxi' | 'location-city' | 'location-disabled' | 'location-off' | 'location-on' | 'location-searching' | 'lock' | 'lock-open' | 'lock-outline' | 'looks' | 'looks-3' | 'looks-4' | 'looks-5' | 'looks-6' | 'looks-one' | 'looks-two' | 'loop' | 'loupe' | 'low-priority' | 'loyalty' | 'mail' | 'mail-outline' | 'map' | 'markunread' | 'markunread-mailbox' | 'memory' | 'menu' | 'merge-type' | 'message' | 'mic' | 'mic-none' | 'mic-off' | 'mms' | 'mode-comment' | 'mode-edit' | 'monetization-on' | 'money-off' | 'monochrome-photos' | 'mood' | 'mood-bad' | 'more' | 'more-horiz' | 'more-vert' | 'motorcycle' | 'mouse' | 'move-to-inbox' | 'movie' | 'movie-creation' | 'movie-filter' | 'multiline-chart' | 'music-note' | 'music-video' | 'my-location' | 'nature' | 'nature-people' | 'navigate-before' | 'navigate-next' | 'navigation' | 'near-me' | 'network-cell' | 'network-check' | 'network-locked' | 'network-wifi' | 'new-releases' | 'next-week' | 'nfc' | 'no-encryption' | 'no-sim' | 'not-interested' | 'note' | 'note-add' | 'notifications' | 'notifications-active' | 'notifications-none' | 'notifications-off' | 'notifications-paused' | 'offline-pin' | 'ondemand-video' | 'opacity' | 'open-in-browser' | 'open-in-new' | 'open-with' | 'pages' | 'pageview' | 'palette' | 'pan-tool' | 'panorama' | 'panorama-fish-eye' | 'panorama-horizontal' | 'panorama-vertical' | 'panorama-wide-angle' | 'party-mode' | 'pause' | 'pause-circle-filled' | 'pause-circle-outline' | 'payment' | 'people' | 'people-outline' | 'perm-camera-mic' | 'perm-contact-calendar' | 'perm-data-setting' | 'perm-device-information' | 'perm-identity' | 'perm-media' | 'perm-phone-msg' | 'perm-scan-wifi' | 'person' | 'person-add' | 'person-outline' | 'person-pin' | 'person-pin-circle' | 'personal-video' | 'pets' | 'phone' | 'phone-android' | 'phone-bluetooth-speaker' | 'phone-forwarded' | 'phone-in-talk' | 'phone-iphone' | 'phone-locked' | 'phone-missed' | 'phone-paused' | 'phonelink' | 'phonelink-erase' | 'phonelink-lock' | 'phonelink-off' | 'phonelink-ring' | 'phonelink-setup' | 'photo' | 'photo-album' | 'photo-camera' | 'photo-filter' | 'photo-library' | 'photo-size-select-actual' | 'photo-size-select-large' | 'photo-size-select-small' | 'picture-as-pdf' | 'picture-in-picture' | 'picture-in-picture-alt' | 'pie-chart' | 'pie-chart-outlined' | 'pin-drop' | 'place' | 'play-arrow' | 'play-circle-filled' | 'play-circle-outline' | 'play-for-work' | 'playlist-add' | 'playlist-add-check' | 'playlist-play' | 'plus-one' | 'poll' | 'polymer' | 'pool' | 'portable-wifi-off' | 'portrait' | 'power' | 'power-input' | 'power-settings-new' | 'pregnant-woman' | 'present-to-all' | 'print' | 'priority-high' | 'public' | 'publish' | 'query-builder' | 'question-answer' | 'queue' | 'queue-music' | 'queue-play-next' | 'radio' | 'radio-button-checked' | 'radio-button-unchecked' | 'rate-review' | 'receipt' | 'recent-actors' | 'record-voice-over' | 'redeem' | 'redo' | 'refresh' | 'remove' | 'remove-circle' | 'remove-circle-outline' | 'remove-from-queue' | 'remove-red-eye' | 'remove-shopping-cart' | 'reorder' | 'repeat' | 'repeat-one' | 'replay' | 'replay-10' | 'replay-30' | 'replay-5' | 'reply' | 'reply-all' | 'report' | 'report-problem' | 'restaurant' | 'restaurant-menu' | 'restore' | 'restore-page' | 'ring-volume' | 'room' | 'room-service' | 'rotate-90-degrees-ccw' | 'rotate-left' | 'rotate-right' | 'rounded-corner' | 'router' | 'rowing' | 'rss-feed' | 'rv-hookup' | 'satellite' | 'save' | 'scanner' | 'schedule' | 'school' | 'screen-lock-landscape' | 'screen-lock-portrait' | 'screen-lock-rotation' | 'screen-rotation' | 'screen-share' | 'sd-card' | 'sd-storage' | 'search' | 'security' | 'select-all' | 'send' | 'sentiment-dissatisfied' | 'sentiment-neutral' | 'sentiment-satisfied' | 'sentiment-very-dissatisfied' | 'sentiment-very-satisfied' | 'settings' | 'settings-applications' | 'settings-backup-restore' | 'settings-bluetooth' | 'settings-brightness' | 'settings-cell' | 'settings-ethernet' | 'settings-input-antenna' | 'settings-input-component' | 'settings-input-composite' | 'settings-input-hdmi' | 'settings-input-svideo' | 'settings-overscan' | 'settings-phone' | 'settings-power' | 'settings-remote' | 'settings-system-daydream' | 'settings-voice' | 'share' | 'shop' | 'shop-two' | 'shopping-basket' | 'shopping-cart' | 'short-text' | 'show-chart' | 'shuffle' | 'signal-cellular-4-bar' | 'signal-cellular-connected-no-internet-4-bar' | 'signal-cellular-no-sim' | 'signal-cellular-null' | 'signal-cellular-off' | 'signal-wifi-4-bar' | 'signal-wifi-4-bar-lock' | 'signal-wifi-off' | 'sim-card' | 'sim-card-alert' | 'skip-next' | 'skip-previous' | 'slideshow' | 'slow-motion-video' | 'smartphone' | 'smoke-free' | 'smoking-rooms' | 'sms' | 'sms-failed' | 'snooze' | 'sort' | 'sort-by-alpha' | 'spa' | 'space-bar' | 'speaker' | 'speaker-group' | 'speaker-notes' | 'speaker-notes-off' | 'speaker-phone' | 'spellcheck' | 'star' | 'star-border' | 'star-half' | 'stars' | 'stay-current-landscape' | 'stay-current-portrait' | 'stay-primary-landscape' | 'stay-primary-portrait' | 'stop' | 'stop-screen-share' | 'storage' | 'store' | 'store-mall-directory' | 'straighten' | 'streetview' | 'strikethrough-s' | 'style' | 'subdirectory-arrow-left' | 'subdirectory-arrow-right' | 'subject' | 'subscriptions' | 'subtitles' | 'subway' | 'supervisor-account' | 'surround-sound' | 'swap-calls' | 'swap-horiz' | 'swap-vert' | 'swap-vertical-circle' | 'switch-camera' | 'switch-video' | 'sync' | 'sync-disabled' | 'sync-problem' | 'system-update' | 'system-update-alt' | 'tab' | 'tab-unselected' | 'tablet' | 'tablet-android' | 'tablet-mac' | 'tag-faces' | 'tap-and-play' | 'terrain' | 'text-fields' | 'text-format' | 'textsms' | 'texture' | 'theaters' | 'thumb-down' | 'thumb-up' | 'thumbs-up-down' | 'time-to-leave' | 'timelapse' | 'timeline' | 'timer' | 'timer-10' | 'timer-3' | 'timer-off' | 'title' | 'toc' | 'today' | 'toll' | 'tonality' | 'touch-app' | 'toys' | 'track-changes' | 'traffic' | 'train' | 'tram' | 'transfer-within-a-station' | 'transform' | 'translate' | 'trending-down' | 'trending-flat' | 'trending-up' | 'tune' | 'turned-in' | 'turned-in-not' | 'tv' | 'unarchive' | 'undo' | 'unfold-less' | 'unfold-more' | 'update' | 'usb' | 'verified-user' | 'vertical-align-bottom' | 'vertical-align-center' | 'vertical-align-top' | 'vibration' | 'video-call' | 'video-label' | 'video-library' | 'videocam' | 'videocam-off' | 'videogame-asset' | 'view-agenda' | 'view-array' | 'view-carousel' | 'view-column' | 'view-comfy' | 'view-compact' | 'view-day' | 'view-headline' | 'view-list' | 'view-module' | 'view-quilt' | 'view-stream' | 'view-week' | 'vignette' | 'visibility' | 'visibility-off' | 'voice-chat' | 'voicemail' | 'volume-down' | 'volume-mute' | 'volume-off' | 'volume-up' | 'vpn-key' | 'vpn-lock' | 'wallpaper' | 'warning' | 'watch' | 'watch-later' | 'wb-auto' | 'wb-cloudy' | 'wb-incandescent' | 'wb-iridescent' | 'wb-sunny' | 'wc' | 'web' | 'web-asset' | 'weekend' | 'whatshot' | 'widgets' | 'wifi' | 'wifi-lock' | 'wifi-tethering' | 'work' | 'wrap-text' | 'youtube-searched-for' | 'zoom-in' | 'zoom-out' | 'zoom-out-map' - } - - interface OcticonsProps extends BaseIconProps { - name: 'alert' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-small-down' | 'arrow-small-left' | 'arrow-small-right' | 'arrow-small-up' | 'arrow-up' | 'beaker' | 'bell' | 'bold' | 'book' | 'bookmark' | 'briefcase' | 'broadcast' | 'browser' | 'bug' | 'calendar' | 'check' | 'checklist' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-slash' | 'circuit-board' | 'clippy' | 'clock' | 'cloud-download' | 'cloud-upload' | 'code' | 'comment' | 'comment-discussion' | 'credit-card' | 'dash' | 'dashboard' | 'database' | 'desktop-download' | 'device-camera' | 'device-camera-video' | 'device-desktop' | 'device-mobile' | 'diff' | 'diff-added' | 'diff-ignored' | 'diff-modified' | 'diff-removed' | 'diff-renamed' | 'ellipsis' | 'eye' | 'file' | 'file-binary' | 'file-code' | 'file-directory' | 'file-media' | 'file-pdf' | 'file-submodule' | 'file-symlink-directory' | 'file-symlink-file' | 'file-text' | 'file-zip' | 'flame' | 'fold' | 'gear' | 'gift' | 'gist' | 'gist-secret' | 'git-branch' | 'git-commit' | 'git-compare' | 'git-merge' | 'git-pull-request' | 'globe' | 'grabber' | 'graph' | 'heart' | 'history' | 'home' | 'horizontal-rule' | 'hubot' | 'inbox' | 'info' | 'issue-closed' | 'issue-opened' | 'issue-reopened' | 'italic' | 'jersey' | 'kebab-horizontal' | 'kebab-vertical' | 'key' | 'keyboard' | 'law' | 'light-bulb' | 'link' | 'link-external' | 'list-ordered' | 'list-unordered' | 'location' | 'lock' | 'logo-gist' | 'logo-github' | 'mail' | 'mail-read' | 'mail-reply' | 'mark-github' | 'markdown' | 'megaphone' | 'mention' | 'milestone' | 'mirror' | 'mortar-board' | 'mute' | 'no-newline' | 'note' | 'octoface' | 'organization' | 'package' | 'paintcan' | 'pencil' | 'person' | 'pin' | 'plug' | 'plus' | 'plus-small' | 'primitive-dot' | 'primitive-square' | 'project' | 'pulse' | 'question' | 'quote' | 'radio-tower' | 'reply' | 'repo' | 'repo-clone' | 'repo-force-push' | 'repo-forked' | 'repo-pull' | 'repo-push' | 'rocket' | 'rss' | 'ruby' | 'screen-full' | 'screen-normal' | 'search' | 'server' | 'settings' | 'shield' | 'sign-in' | 'sign-out' | 'smiley' | 'squirrel' | 'star' | 'stop' | 'sync' | 'tag' | 'tasklist' | 'telescope' | 'terminal' | 'text-size' | 'three-bars' | 'thumbsdown' | 'thumbsup' | 'tools' | 'trashcan' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'unfold' | 'unmute' | 'unverified' | 'verified' | 'versions' | 'watch' | 'x' | 'zap' - } - - interface SimpleLineIconsProps extends BaseIconProps { - name: 'user' | 'people' | 'user-female' | 'user-follow' | 'user-following' | 'user-unfollow' | 'login' | 'logout' | 'emotsmile' | 'phone' | 'call-end' | 'call-in' | 'call-out' | 'map' | 'location-pin' | 'direction' | 'directions' | 'compass' | 'layers' | 'menu' | 'list' | 'options-vertical' | 'options' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-circle' | 'arrow-left-circle' | 'arrow-right-circle' | 'arrow-down-circle' | 'check' | 'clock' | 'plus' | 'minus' | 'close' | 'event' | 'exclamation' | 'organization' | 'trophy' | 'screen-smartphone' | 'screen-desktop' | 'plane' | 'notebook' | 'mustache' | 'mouse' | 'magnet' | 'energy' | 'disc' | 'cursor' | 'cursor-move' | 'crop' | 'chemistry' | 'speedometer' | 'shield' | 'screen-tablet' | 'magic-wand' | 'hourglass' | 'graduation' | 'ghost' | 'game-controller' | 'fire' | 'eyeglass' | 'envelope-open' | 'envelope-letter' | 'bell' | 'badge' | 'anchor' | 'wallet' | 'vector' | 'speech' | 'puzzle' | 'printer' | 'present' | 'playlist' | 'pin' | 'picture' | 'handbag' | 'globe-alt' | 'globe' | 'folder-alt' | 'folder' | 'film' | 'feed' | 'drop' | 'drawer' | 'docs' | 'doc' | 'diamond' | 'cup' | 'calculator' | 'bubbles' | 'briefcase' | 'book-open' | 'basket-loaded' | 'basket' | 'bag' | 'action-undo' | 'action-redo' | 'wrench' | 'umbrella' | 'trash' | 'tag' | 'support' | 'frame' | 'size-fullscreen' | 'size-actual' | 'shuffle' | 'share-alt' | 'share' | 'rocket' | 'question' | 'pie-chart' | 'pencil' | 'note' | 'loop' | 'home' | 'grid' | 'graph' | 'microphone' | 'music-tone-alt' | 'music-tone' | 'earphones-alt' | 'earphones' | 'equalizer' | 'like' | 'dislike' | 'control-start' | 'control-rewind' | 'control-play' | 'control-pause' | 'control-forward' | 'control-end' | 'volume-1' | 'volume-2' | 'volume-off' | 'calendar' | 'bulb' | 'chart' | 'ban' | 'bubble' | 'camrecorder' | 'camera' | 'cloud-download' | 'cloud-upload' | 'envelope' | 'eye' | 'flag' | 'heart' | 'info' | 'key' | 'link' | 'lock' | 'lock-open' | 'magnifier' | 'magnifier-add' | 'magnifier-remove' | 'paper-clip' | 'paper-plane' | 'power' | 'refresh' | 'reload' | 'settings' | 'star' | 'symbol-female' | 'symbol-male' | 'target' | 'credit-card' | 'paypal' | 'social-tumblr' | 'social-twitter' | 'social-facebook' | 'social-instagram' | 'social-linkedin' | 'social-pinterest' | 'social-github' | 'social-google' | 'social-reddit' | 'social-skype' | 'social-dribbble' | 'social-behance' | 'social-foursqare' | 'social-soundcloud' | 'social-spotify' | 'social-stumbleupon' | 'social-youtube' | 'social-dropbox' | 'social-vkontakte' | 'social-steam' - } - - interface ZocialProps extends BaseIconProps { - name: 'acrobat' | 'amazon' | 'android' | 'angellist' | 'aol' | 'appnet' | 'appstore' | 'bitbucket' | 'bitcoin' | 'blogger' | 'buffer' | 'cal' | 'call' | 'cart' | 'chrome' | 'cloudapp' | 'creativecommons' | 'delicious' | 'digg' | 'disqus' | 'dribbble' | 'dropbox' | 'drupal' | 'dwolla' | 'email' | 'eventasaurus' | 'eventbrite' | 'eventful' | 'evernote' | 'facebook' | 'fivehundredpx' | 'flattr' | 'flickr' | 'forrst' | 'foursquare' | 'github' | 'gmail' | 'google' | 'googleplay' | 'googleplus' | 'gowalla' | 'grooveshark' | 'guest' | 'html5' | 'ie' | 'instagram' | 'instapaper' | 'intensedebate' | 'itunes' | 'klout' | 'lanyrd' | 'lastfm' | 'lego' | 'linkedin' | 'lkdto' | 'logmein' | 'macstore' | 'meetup' | 'myspace' | 'ninetyninedesigns' | 'openid' | 'opentable' | 'paypal' | 'persona' | 'pinboard' | 'pinterest' | 'plancast' | 'plurk' | 'pocket' | 'podcast' | 'posterous' | 'print' | 'quora' | 'reddit' | 'rss' | 'scribd' | 'skype' | 'smashing' | 'songkick' | 'soundcloud' | 'spotify' | 'stackoverflow' | 'statusnet' | 'steam' | 'stripe' | 'stumbleupon' | 'tumblr' | 'twitter' | 'viadeo' | 'vimeo' | 'vk' | 'weibo' | 'wikipedia' | 'windows' | 'wordpress' | 'xing' | 'yahoo' | 'ycombinator' | 'yelp' | 'youtube' - } - - abstract class BaseIconsComponent extends Component { - static Button: any - static font: any - static glyphMap: any - } - - class Entypo extends BaseIconsComponent { } - class EvilIcons extends BaseIconsComponent { } - class Feather extends BaseIconsComponent { } - class FontAwesome extends BaseIconsComponent { } - class Foundation extends BaseIconsComponent { } - class Ionicons extends BaseIconsComponent { } - class MaterialCommunityIcons extends BaseIconsComponent { } - class MaterialIcons extends BaseIconsComponent { } - class Octicons extends BaseIconsComponent { } - class SimpleLineIcons extends BaseIconsComponent { } - class Zocial extends BaseIconsComponent { } -} From 919e96c088b49a7ef547ad139a086ab41487d26c Mon Sep 17 00:00:00 2001 From: KonstantinKai Date: Wed, 24 Jan 2018 11:36:46 +0200 Subject: [PATCH 23/52] Add tests, replace all export to declare --- types/expo/expo-tests.tsx | 121 +++++++++- types/expo/index.d.ts | 453 ++++++++++++++++++++------------------ 2 files changed, 359 insertions(+), 215 deletions(-) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 40243e4e44..1ea712f66b 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -12,6 +12,7 @@ import { BlurView, Brightness, Camera, + CameraObject, DocumentPicker, Facebook, FacebookAds, @@ -19,7 +20,13 @@ import { ImagePicker, ImageManipulator, FaceDetector, - Svg + Svg, + IntentLauncherAndroid, + KeepAwake, + LinearGradient, + Permissions, + registerRootComponent, + ScreenOrientation } from 'expo'; Accelerometer.addListener((obj) => { @@ -424,3 +431,115 @@ async () => { ); + +IntentLauncherAndroid.ACTION_ACCESSIBILITY_SETTINGS === 'android.settings.ACCESSIBILITY_SETTINGS'; +IntentLauncherAndroid.ACTION_APP_NOTIFICATION_REDACTION === 'android.settings.ACTION_APP_NOTIFICATION_REDACTION'; +IntentLauncherAndroid.ACTION_CONDITION_PROVIDER_SETTINGS === 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS'; +IntentLauncherAndroid.ACTION_NOTIFICATION_LISTENER_SETTINGS === 'android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS'; +IntentLauncherAndroid.ACTION_PRINT_SETTINGS === 'android.settings.ACTION_PRINT_SETTINGS'; +IntentLauncherAndroid.ACTION_ADD_ACCOUNT_SETTINGS === 'android.settings.ADD_ACCOUNT_SETTINGS'; +IntentLauncherAndroid.ACTION_AIRPLANE_MODE_SETTINGS === 'android.settings.AIRPLANE_MODE_SETTINGS'; +IntentLauncherAndroid.ACTION_APN_SETTINGS === 'android.settings.APN_SETTINGS'; +IntentLauncherAndroid.ACTION_APPLICATION_DETAILS_SETTINGS === 'android.settings.APPLICATION_DETAILS_SETTINGS'; +IntentLauncherAndroid.ACTION_APPLICATION_DEVELOPMENT_SETTINGS === 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS'; +IntentLauncherAndroid.ACTION_APPLICATION_SETTINGS === 'android.settings.APPLICATION_SETTINGS'; +IntentLauncherAndroid.ACTION_APP_NOTIFICATION_SETTINGS === 'android.settings.APP_NOTIFICATION_SETTINGS'; +IntentLauncherAndroid.ACTION_APP_OPS_SETTINGS === 'android.settings.APP_OPS_SETTINGS'; +IntentLauncherAndroid.ACTION_BATTERY_SAVER_SETTINGS === 'android.settings.BATTERY_SAVER_SETTINGS'; +IntentLauncherAndroid.ACTION_BLUETOOTH_SETTINGS === 'android.settings.BLUETOOTH_SETTINGS'; +IntentLauncherAndroid.ACTION_CAPTIONING_SETTINGS === 'android.settings.CAPTIONING_SETTINGS'; +IntentLauncherAndroid.ACTION_CAST_SETTINGS === 'android.settings.CAST_SETTINGS'; +IntentLauncherAndroid.ACTION_DATA_ROAMING_SETTINGS === 'android.settings.DATA_ROAMING_SETTINGS'; +IntentLauncherAndroid.ACTION_DATE_SETTINGS === 'android.settings.DATE_SETTINGS'; +IntentLauncherAndroid.ACTION_DEVICE_INFO_SETTINGS === 'android.settings.DEVICE_INFO_SETTINGS'; +IntentLauncherAndroid.ACTION_DEVICE_NAME === 'android.settings.DEVICE_NAME'; +IntentLauncherAndroid.ACTION_DISPLAY_SETTINGS === 'android.settings.DISPLAY_SETTINGS'; +IntentLauncherAndroid.ACTION_DREAM_SETTINGS === 'android.settings.DREAM_SETTINGS'; +IntentLauncherAndroid.ACTION_HARD_KEYBOARD_SETTINGS === 'android.settings.HARD_KEYBOARD_SETTINGS'; +IntentLauncherAndroid.ACTION_HOME_SETTINGS === 'android.settings.HOME_SETTINGS'; +IntentLauncherAndroid.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS === 'android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS'; +IntentLauncherAndroid.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS === 'android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS'; +IntentLauncherAndroid.ACTION_INPUT_METHOD_SETTINGS === 'android.settings.INPUT_METHOD_SETTINGS'; +IntentLauncherAndroid.ACTION_INPUT_METHOD_SUBTYPE_SETTINGS === 'android.settings.INPUT_METHOD_SUBTYPE_SETTINGS'; +IntentLauncherAndroid.ACTION_INTERNAL_STORAGE_SETTINGS === 'android.settings.INTERNAL_STORAGE_SETTINGS'; +IntentLauncherAndroid.ACTION_LOCALE_SETTINGS === 'android.settings.LOCALE_SETTINGS'; +IntentLauncherAndroid.ACTION_LOCATION_SOURCE_SETTINGS === 'android.settings.LOCATION_SOURCE_SETTINGS'; +IntentLauncherAndroid.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS === 'android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS'; +IntentLauncherAndroid.ACTION_MANAGE_APPLICATIONS_SETTINGS === 'android.settings.MANAGE_APPLICATIONS_SETTINGS'; +IntentLauncherAndroid.ACTION_MANAGE_DEFAULT_APPS_SETTINGS === 'android.settings.MANAGE_DEFAULT_APPS_SETTINGS'; +IntentLauncherAndroid.ACTION_MEMORY_CARD_SETTINGS === 'android.settings.MEMORY_CARD_SETTINGS'; +IntentLauncherAndroid.ACTION_MONITORING_CERT_INFO === 'android.settings.MONITORING_CERT_INFO'; +IntentLauncherAndroid.ACTION_NETWORK_OPERATOR_SETTINGS === 'android.settings.NETWORK_OPERATOR_SETTINGS'; +IntentLauncherAndroid.ACTION_NFCSHARING_SETTINGS === 'android.settings.NFCSHARING_SETTINGS'; +IntentLauncherAndroid.ACTION_NFC_PAYMENT_SETTINGS === 'android.settings.NFC_PAYMENT_SETTINGS'; +IntentLauncherAndroid.ACTION_NFC_SETTINGS === 'android.settings.NFC_SETTINGS'; +IntentLauncherAndroid.ACTION_NIGHT_DISPLAY_SETTINGS === 'android.settings.NIGHT_DISPLAY_SETTINGS'; +IntentLauncherAndroid.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS === 'android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS'; +IntentLauncherAndroid.ACTION_NOTIFICATION_SETTINGS === 'android.settings.NOTIFICATION_SETTINGS'; +IntentLauncherAndroid.ACTION_PAIRING_SETTINGS === 'android.settings.PAIRING_SETTINGS'; +IntentLauncherAndroid.ACTION_PRIVACY_SETTINGS === 'android.settings.PRIVACY_SETTINGS'; +IntentLauncherAndroid.ACTION_QUICK_LAUNCH_SETTINGS === 'android.settings.QUICK_LAUNCH_SETTINGS'; +IntentLauncherAndroid.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS === 'android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS'; +IntentLauncherAndroid.ACTION_SECURITY_SETTINGS === 'android.settings.SECURITY_SETTINGS'; +IntentLauncherAndroid.ACTION_SETTINGS === 'android.settings.SETTINGS'; +IntentLauncherAndroid.ACTION_SHOW_ADMIN_SUPPORT_DETAILS === 'android.settings.SHOW_ADMIN_SUPPORT_DETAILS'; +IntentLauncherAndroid.ACTION_SHOW_INPUT_METHOD_PICKER === 'android.settings.SHOW_INPUT_METHOD_PICKER'; +IntentLauncherAndroid.ACTION_SHOW_REGULATORY_INFO === 'android.settings.SHOW_REGULATORY_INFO'; +IntentLauncherAndroid.ACTION_SHOW_REMOTE_BUGREPORT_DIALOG === 'android.settings.SHOW_REMOTE_BUGREPORT_DIALOG'; +IntentLauncherAndroid.ACTION_SOUND_SETTINGS === 'android.settings.SOUND_SETTINGS'; +IntentLauncherAndroid.ACTION_STORAGE_MANAGER_SETTINGS === 'android.settings.STORAGE_MANAGER_SETTINGS'; +IntentLauncherAndroid.ACTION_SYNC_SETTINGS === 'android.settings.SYNC_SETTINGS'; +IntentLauncherAndroid.ACTION_SYSTEM_UPDATE_SETTINGS === 'android.settings.SYSTEM_UPDATE_SETTINGS'; +IntentLauncherAndroid.ACTION_TETHER_PROVISIONING_UI === 'android.settings.TETHER_PROVISIONING_UI'; +IntentLauncherAndroid.ACTION_TRUSTED_CREDENTIALS_USER === 'android.settings.TRUSTED_CREDENTIALS_USER'; +IntentLauncherAndroid.ACTION_USAGE_ACCESS_SETTINGS === 'android.settings.USAGE_ACCESS_SETTINGS'; +IntentLauncherAndroid.ACTION_USER_DICTIONARY_INSERT === 'android.settings.USER_DICTIONARY_INSERT'; +IntentLauncherAndroid.ACTION_USER_DICTIONARY_SETTINGS === 'android.settings.USER_DICTIONARY_SETTINGS'; +IntentLauncherAndroid.ACTION_USER_SETTINGS === 'android.settings.USER_SETTINGS'; +IntentLauncherAndroid.ACTION_VOICE_CONTROL_AIRPLANE_MODE === 'android.settings.VOICE_CONTROL_AIRPLANE_MODE'; +IntentLauncherAndroid.ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE === 'android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE'; +IntentLauncherAndroid.ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE === 'android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE'; +IntentLauncherAndroid.ACTION_VOICE_INPUT_SETTINGS === 'android.settings.VOICE_INPUT_SETTINGS'; +IntentLauncherAndroid.ACTION_VPN_SETTINGS === 'android.settings.VPN_SETTINGS'; +IntentLauncherAndroid.ACTION_VR_LISTENER_SETTINGS === 'android.settings.VR_LISTENER_SETTINGS'; +IntentLauncherAndroid.ACTION_WEBVIEW_SETTINGS === 'android.settings.WEBVIEW_SETTINGS'; +IntentLauncherAndroid.ACTION_WIFI_IP_SETTINGS === 'android.settings.WIFI_IP_SETTINGS'; +IntentLauncherAndroid.ACTION_WIFI_SETTINGS === 'android.settings.WIFI_SETTINGS'; +IntentLauncherAndroid.ACTION_WIRELESS_SETTINGS === 'android.settings.WIRELESS_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_AUTOMATION_SETTINGS === 'android.settings.ZEN_MODE_AUTOMATION_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_EVENT_RULE_SETTINGS === 'android.settings.ZEN_MODE_EVENT_RULE_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS === 'android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_PRIORITY_SETTINGS === 'android.settings.ZEN_MODE_PRIORITY_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS === 'android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_SETTINGS === 'android.settings.ZEN_MODE_SETTINGS'; + +KeepAwake.activate(); +KeepAwake.deactivate(); + +() => ( + +); + +Permissions.CAMERA === 'camera'; +Permissions.CAMERA_ROLL === 'cameraRoll'; +Permissions.AUDIO_RECORDING === 'audioRecording'; +Permissions.CONTACTS === 'contacts'; +Permissions.NOTIFICATIONS === 'remoteNotifications'; +Permissions.REMOTE_NOTIFICATIONS === 'remoteNotifications'; +Permissions.SYSTEM_BRIGHTNESS === 'systemBrightness'; +async () => { + const result = await Permissions.askAsync(Permissions.CAMERA); + + result.status === 'granted'; + result.status === 'denied'; + result.status === 'undetermined'; + + result.expires === 'never'; +}; + +ScreenOrientation.Orientation.ALL +ScreenOrientation.allow(ScreenOrientation.Orientation.ALL); \ No newline at end of file diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index fb16ade744..3c4e217147 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -14,7 +14,8 @@ import { ImageURISource, NativeEventEmitter, ViewProperties, - ViewStyle + ViewStyle, + Permission } from 'react-native'; type Axis = number; @@ -96,7 +97,7 @@ declare namespace Amplitude { // #region AppLoading /** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ -export type AppLoadingProps = { +declare type AppLoadingProps = { /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ startAsync: () => Promise; @@ -106,21 +107,21 @@ export type AppLoadingProps = { /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ onError?: (error: Error) => void; } | { - startAsync: null; - onFinish: null; - onError?: null; - }; + startAsync: null; + onFinish: null; + onError?: null; +}; /** * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. * * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. */ -export class AppLoading extends Component { } +declare class AppLoading extends Component { } // #endregion AppLoading /** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ -export class Asset { +declare class Asset { constructor({ name, type, hash, uri, width, height }: { name: string; type: string; @@ -269,14 +270,14 @@ declare namespace Audio { canRecord: false, isDoneRecording: false } | { - canRecord: true, - isRecording: boolean, - durationMillis: number - } | { - canRecord: false, - isDoneRecording: true, - durationMillis: number - }; + canRecord: true, + isRecording: boolean, + durationMillis: number + } | { + canRecord: false, + isDoneRecording: true, + durationMillis: number + }; const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; @@ -417,21 +418,22 @@ declare namespace Audio { * AuthSession */ declare namespace AuthSession { - function startAsync(options: { authUrl: string; returnUrl?: string; }): Promise< - { - type: 'cancel'; - } | { - type: 'dismissed'; - } | { - type: 'success'; - params: HashMap; - event: HashMap; - } | { - type: 'error'; - params: HashMap; - errorCode: string; - event: HashMap; - }>; + type StartAsyncResponse = { + type: 'cancel'; + } | { + type: 'dismissed'; + } | { + type: 'success'; + params: HashMap; + event: HashMap; + } | { + type: 'error'; + params: HashMap; + errorCode: string; + event: HashMap; + }; + + function startAsync(options: { authUrl: string; returnUrl?: string; }): Promise; function dismiss(): void; function getRedirectUrl(): string; } @@ -440,35 +442,34 @@ declare namespace AuthSession { /** * AV */ -export type PlaybackStatus = - { - isLoaded: false; - androidImplementation?: string; +declare type PlaybackStatus = { + isLoaded: false; + androidImplementation?: string; - /** Populated exactly once when an error forces the object to unload. */ - error?: string; - } | { - isLoaded: true; - androidImplementation?: string; - uri: string; - progressUpdateIntervalMillis: number; - durationMillis?: number; - positionMillis: number; - playableDurationMillis?: number; - shouldPlay: boolean; - isPlaying: boolean; - isBuffering: boolean; - rate: number; - shouldCorrectPitch: boolean; - volume: number; - isMuted: boolean; - isLooping: boolean; + /** Populated exactly once when an error forces the object to unload. */ + error?: string; +} | { + isLoaded: true; + androidImplementation?: string; + uri: string; + progressUpdateIntervalMillis: number; + durationMillis?: number; + positionMillis: number; + playableDurationMillis?: number; + shouldPlay: boolean; + isPlaying: boolean; + isBuffering: boolean; + rate: number; + shouldCorrectPitch: boolean; + volume: number; + isMuted: boolean; + isLooping: boolean; - /** True exactly once when the track plays to finish. */ - didJustFinish: boolean; - }; + /** True exactly once when the track plays to finish. */ + didJustFinish: boolean; +}; -export interface PlaybackStatusToSet { +declare interface PlaybackStatusToSet { androidImplementation?: string; progressUpdateIntervalMillis?: number; positionMillis?: number; @@ -480,9 +481,9 @@ export interface PlaybackStatusToSet { isLooping?: boolean; } -export type PlaybackSource = RequireSource | { uri: string } | Asset; +type PlaybackSource = RequireSource | { uri: string } | Asset; -export class PlaybackObject { +declare class PlaybackObject { /** * Gets the `PlaybackStatus` of the `playbackObject`. * @@ -623,25 +624,25 @@ export class PlaybackObject { /** * BarCodeScanner */ -export interface BarCodeScannerProps extends ViewProperties { +declare interface BarCodeScannerProps extends ViewProperties { type?: 'front' | 'back'; torchMode?: 'on' | 'off'; barCodeTypes?: string[]; onBarCodeRead?: BarCodeReadCallback; } -export class BarCodeScanner extends Component { } +declare class BarCodeScanner extends Component { } // #endregion // #region BlurView /** * BlurView */ -export interface BlurViewProps extends ViewProperties { +declare interface BlurViewProps extends ViewProperties { tint: 'light' | 'default' | 'dark'; intensity: number; } -export class BlurView extends Component { } +declare class BlurView extends Component { } // #endregion /** @@ -658,28 +659,32 @@ declare namespace Brightness { /** * Camera */ -interface PictureOptions { +declare interface PictureOptions { quality?: number; } -export interface PictureResponse { + +declare interface PictureResponse { uri: string; width: number; height: number; exif: string; base64: string; } -export interface RecordingOptions { + +declare interface RecordingOptions { quality?: string | number; maxDuration?: number; maxFileSize?: number; } -export class CameraObject { + +declare class CameraObject { takePictureAsync(options: PictureOptions): Promise; recordAsync(options: RecordingOptions): Promise<{ uri: string; }>; stopRecording(): void; getSupportedRatiosAsync(): Promise; // Android only } -export interface CameraProps extends ViewProperties { + +declare interface CameraProps extends ViewProperties { flashMode?: string | number; type?: string | number; ratio?: string; @@ -693,6 +698,7 @@ export interface CameraProps extends ViewProperties { onBarCodeRead?: BarCodeReadCallback; ref?: Ref; } + interface CameraConstants { readonly Type: string; readonly FlashMode: string; @@ -701,7 +707,8 @@ interface CameraConstants { readonly VideoQuality: string; readonly BarCodeType: string; } -export class Camera extends Component { + +declare class Camera extends Component { static readonly Constants: CameraConstants; } // #endregion @@ -981,14 +988,15 @@ declare namespace DocumentPicker { interface Options { type?: string; } + type Response = { type: 'success'; uri: string; name: string; size: number; } | { - type: 'cancel'; - }; + type: 'cancel'; + }; function getDocumentAsync(options?: Options): Promise; } @@ -1008,13 +1016,15 @@ declare namespace Facebook { permissions?: string[]; behavior?: 'web' | 'native' | 'browser' | 'system'; } + type Response = { type: 'success'; token: string; expires: number; } | { - type: 'cancel'; - }; + type: 'cancel'; + }; + function logInWithReadPermissionsAsync(appId: string, options?: Options): Promise; } @@ -1159,9 +1169,9 @@ declare namespace FileSystem { modificationTime: number; md5?: Md5; } | { - exists: false; - isDirectory: false; - }; + exists: false; + isDirectory: false; + }; interface DownloadResult { uri: string; @@ -1230,11 +1240,11 @@ declare namespace Fingerprint { type FingerprintAuthenticationResult = { success: true } | { - success: false, + success: false, - /** Error code in the case where authentication fails. */ - error: string - }; + /** Error code in the case where authentication fails. */ + error: string + }; /** Determine whether the Fingerprint scanner is available on the device. */ function hasHardwareAsync(): Promise; @@ -1269,11 +1279,12 @@ declare namespace Font { /** * GLView */ -export interface GLViewProps extends ViewProperties { +declare interface GLViewProps extends ViewProperties { onContextCreate(): void; msaaSamples: number; } -export class GLView extends Component { } + +declare class GLView extends Component { } // #endregion /** @@ -1293,20 +1304,20 @@ declare namespace Google { type LogInResult = { type: 'cancel'; } | { - type: 'success'; - accessToken: string; - idToken?: string; - refreshToken?: string; - serverAuthCode?: string; - user: { - id: string; - name: string; - givenName: string; - familyName: string; - photoUrl?: string; - email?: string; - } - }; + type: 'success'; + accessToken: string; + idToken?: string; + refreshToken?: string; + serverAuthCode?: string; + user: { + id: string; + name: string; + givenName: string; + familyName: string; + photoUrl?: string; + email?: string; + } + }; function logInAsync(config: LogInConfig): Promise; } @@ -1339,23 +1350,27 @@ declare namespace ImageManipulator { height: number; base64?: string; } + interface SaveOptions { base64?: boolean; compress?: FloatFromZeroToOne; format?: 'jpeg' | 'png'; } + interface CropParameters { originX: number; originY: number; width: number; height: number; } + interface ImageManipulationOptions { resize?: { width?: number; height?: number }; rotate?: number; flip?: { vertical?: boolean; horizontal?: boolean }; crop?: CropParameters; } + function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; } @@ -1393,6 +1408,7 @@ declare namespace ImagePicker { aspect?: [number, number]; quality?: number; } + function launchCameraAsync(options?: CameraOptions): Promise; } @@ -1400,86 +1416,86 @@ declare namespace ImagePicker { * IntentLauncherAndroid */ declare namespace IntentLauncherAndroid { - const ACTION_ACCESSIBILITY_SETTINGS: string; - const ACTION_APP_NOTIFICATION_REDACTION: string; - const ACTION_CONDITION_PROVIDER_SETTINGS: string; - const ACTION_NOTIFICATION_LISTENER_SETTINGS: string; - const ACTION_PRINT_SETTINGS: string; - const ACTION_ADD_ACCOUNT_SETTINGS: string; - const ACTION_AIRPLANE_MODE_SETTINGS: string; - const ACTION_APN_SETTINGS: string; - const ACTION_APPLICATION_DETAILS_SETTINGS: string; - const ACTION_APPLICATION_DEVELOPMENT_SETTINGS: string; - const ACTION_APPLICATION_SETTINGS: string; - const ACTION_APP_NOTIFICATION_SETTINGS: string; - const ACTION_APP_OPS_SETTINGS: string; - const ACTION_BATTERY_SAVER_SETTINGS: string; - const ACTION_BLUETOOTH_SETTINGS: string; - const ACTION_CAPTIONING_SETTINGS: string; - const ACTION_CAST_SETTINGS: string; - const ACTION_DATA_ROAMING_SETTINGS: string; - const ACTION_DATE_SETTINGS: string; - const ACTION_DEVICE_INFO_SETTINGS: string; - const ACTION_DEVICE_NAME: string; - const ACTION_DISPLAY_SETTINGS: string; - const ACTION_DREAM_SETTINGS: string; - const ACTION_HARD_KEYBOARD_SETTINGS: string; - const ACTION_HOME_SETTINGS: string; - const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS: string; - const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS: string; - const ACTION_INPUT_METHOD_SETTINGS: string; - const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS: string; - const ACTION_INTERNAL_STORAGE_SETTINGS: string; - const ACTION_LOCALE_SETTINGS: string; - const ACTION_LOCATION_SOURCE_SETTINGS: string; - const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS: string; - const ACTION_MANAGE_APPLICATIONS_SETTINGS: string; - const ACTION_MANAGE_DEFAULT_APPS_SETTINGS: string; - const ACTION_MEMORY_CARD_SETTINGS: string; - const ACTION_MONITORING_CERT_INFO: string; - const ACTION_NETWORK_OPERATOR_SETTINGS: string; - const ACTION_NFCSHARING_SETTINGS: string; - const ACTION_NFC_PAYMENT_SETTINGS: string; - const ACTION_NFC_SETTINGS: string; - const ACTION_NIGHT_DISPLAY_SETTINGS: string; - const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS: string; - const ACTION_NOTIFICATION_SETTINGS: string; - const ACTION_PAIRING_SETTINGS: string; - const ACTION_PRIVACY_SETTINGS: string; - const ACTION_QUICK_LAUNCH_SETTINGS: string; - const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: string; - const ACTION_SECURITY_SETTINGS: string; - const ACTION_SETTINGS: string; - const ACTION_SHOW_ADMIN_SUPPORT_DETAILS: string; - const ACTION_SHOW_INPUT_METHOD_PICKER: string; - const ACTION_SHOW_REGULATORY_INFO: string; - const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG: string; - const ACTION_SOUND_SETTINGS: string; - const ACTION_STORAGE_MANAGER_SETTINGS: string; - const ACTION_SYNC_SETTINGS: string; - const ACTION_SYSTEM_UPDATE_SETTINGS: string; - const ACTION_TETHER_PROVISIONING_UI: string; - const ACTION_TRUSTED_CREDENTIALS_USER: string; - const ACTION_USAGE_ACCESS_SETTINGS: string; - const ACTION_USER_DICTIONARY_INSERT: string; - const ACTION_USER_DICTIONARY_SETTINGS: string; - const ACTION_USER_SETTINGS: string; - const ACTION_VOICE_CONTROL_AIRPLANE_MODE: string; - const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE: string; - const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE: string; - const ACTION_VOICE_INPUT_SETTINGS: string; - const ACTION_VPN_SETTINGS: string; - const ACTION_VR_LISTENER_SETTINGS: string; - const ACTION_WEBVIEW_SETTINGS: string; - const ACTION_WIFI_IP_SETTINGS: string; - const ACTION_WIFI_SETTINGS: string; - const ACTION_WIRELESS_SETTINGS: string; - const ACTION_ZEN_MODE_AUTOMATION_SETTINGS: string; - const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_PRIORITY_SETTINGS: string; - const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS: string; - const ACTION_ZEN_MODE_SETTINGS: string; + const ACTION_ACCESSIBILITY_SETTINGS: 'android.settings.ACCESSIBILITY_SETTINGS'; + const ACTION_APP_NOTIFICATION_REDACTION: 'android.settings.ACTION_APP_NOTIFICATION_REDACTION'; + const ACTION_CONDITION_PROVIDER_SETTINGS: 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS'; + const ACTION_NOTIFICATION_LISTENER_SETTINGS: 'android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS'; + const ACTION_PRINT_SETTINGS: 'android.settings.ACTION_PRINT_SETTINGS'; + const ACTION_ADD_ACCOUNT_SETTINGS: 'android.settings.ADD_ACCOUNT_SETTINGS'; + const ACTION_AIRPLANE_MODE_SETTINGS: 'android.settings.AIRPLANE_MODE_SETTINGS'; + const ACTION_APN_SETTINGS: 'android.settings.APN_SETTINGS'; + const ACTION_APPLICATION_DETAILS_SETTINGS: 'android.settings.APPLICATION_DETAILS_SETTINGS'; + const ACTION_APPLICATION_DEVELOPMENT_SETTINGS: 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS'; + const ACTION_APPLICATION_SETTINGS: 'android.settings.APPLICATION_SETTINGS'; + const ACTION_APP_NOTIFICATION_SETTINGS: 'android.settings.APP_NOTIFICATION_SETTINGS'; + const ACTION_APP_OPS_SETTINGS: 'android.settings.APP_OPS_SETTINGS'; + const ACTION_BATTERY_SAVER_SETTINGS: 'android.settings.BATTERY_SAVER_SETTINGS'; + const ACTION_BLUETOOTH_SETTINGS: 'android.settings.BLUETOOTH_SETTINGS'; + const ACTION_CAPTIONING_SETTINGS: 'android.settings.CAPTIONING_SETTINGS'; + const ACTION_CAST_SETTINGS: 'android.settings.CAST_SETTINGS'; + const ACTION_DATA_ROAMING_SETTINGS: 'android.settings.DATA_ROAMING_SETTINGS'; + const ACTION_DATE_SETTINGS: 'android.settings.DATE_SETTINGS'; + const ACTION_DEVICE_INFO_SETTINGS: 'android.settings.DEVICE_INFO_SETTINGS'; + const ACTION_DEVICE_NAME: 'android.settings.DEVICE_NAME'; + const ACTION_DISPLAY_SETTINGS: 'android.settings.DISPLAY_SETTINGS'; + const ACTION_DREAM_SETTINGS: 'android.settings.DREAM_SETTINGS'; + const ACTION_HARD_KEYBOARD_SETTINGS: 'android.settings.HARD_KEYBOARD_SETTINGS'; + const ACTION_HOME_SETTINGS: 'android.settings.HOME_SETTINGS'; + const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS: 'android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS'; + const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS: 'android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS'; + const ACTION_INPUT_METHOD_SETTINGS: 'android.settings.INPUT_METHOD_SETTINGS'; + const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS: 'android.settings.INPUT_METHOD_SUBTYPE_SETTINGS'; + const ACTION_INTERNAL_STORAGE_SETTINGS: 'android.settings.INTERNAL_STORAGE_SETTINGS'; + const ACTION_LOCALE_SETTINGS: 'android.settings.LOCALE_SETTINGS'; + const ACTION_LOCATION_SOURCE_SETTINGS: 'android.settings.LOCATION_SOURCE_SETTINGS'; + const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS: 'android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS'; + const ACTION_MANAGE_APPLICATIONS_SETTINGS: 'android.settings.MANAGE_APPLICATIONS_SETTINGS'; + const ACTION_MANAGE_DEFAULT_APPS_SETTINGS: 'android.settings.MANAGE_DEFAULT_APPS_SETTINGS'; + const ACTION_MEMORY_CARD_SETTINGS: 'android.settings.MEMORY_CARD_SETTINGS'; + const ACTION_MONITORING_CERT_INFO: 'android.settings.MONITORING_CERT_INFO'; + const ACTION_NETWORK_OPERATOR_SETTINGS: 'android.settings.NETWORK_OPERATOR_SETTINGS'; + const ACTION_NFCSHARING_SETTINGS: 'android.settings.NFCSHARING_SETTINGS'; + const ACTION_NFC_PAYMENT_SETTINGS: 'android.settings.NFC_PAYMENT_SETTINGS'; + const ACTION_NFC_SETTINGS: 'android.settings.NFC_SETTINGS'; + const ACTION_NIGHT_DISPLAY_SETTINGS: 'android.settings.NIGHT_DISPLAY_SETTINGS'; + const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS: 'android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS'; + const ACTION_NOTIFICATION_SETTINGS: 'android.settings.NOTIFICATION_SETTINGS'; + const ACTION_PAIRING_SETTINGS: 'android.settings.PAIRING_SETTINGS'; + const ACTION_PRIVACY_SETTINGS: 'android.settings.PRIVACY_SETTINGS'; + const ACTION_QUICK_LAUNCH_SETTINGS: 'android.settings.QUICK_LAUNCH_SETTINGS'; + const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: 'android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS'; + const ACTION_SECURITY_SETTINGS: 'android.settings.SECURITY_SETTINGS'; + const ACTION_SETTINGS: 'android.settings.SETTINGS'; + const ACTION_SHOW_ADMIN_SUPPORT_DETAILS: 'android.settings.SHOW_ADMIN_SUPPORT_DETAILS'; + const ACTION_SHOW_INPUT_METHOD_PICKER: 'android.settings.SHOW_INPUT_METHOD_PICKER'; + const ACTION_SHOW_REGULATORY_INFO: 'android.settings.SHOW_REGULATORY_INFO'; + const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG: 'android.settings.SHOW_REMOTE_BUGREPORT_DIALOG'; + const ACTION_SOUND_SETTINGS: 'android.settings.SOUND_SETTINGS'; + const ACTION_STORAGE_MANAGER_SETTINGS: 'android.settings.STORAGE_MANAGER_SETTINGS'; + const ACTION_SYNC_SETTINGS: 'android.settings.SYNC_SETTINGS'; + const ACTION_SYSTEM_UPDATE_SETTINGS: 'android.settings.SYSTEM_UPDATE_SETTINGS'; + const ACTION_TETHER_PROVISIONING_UI: 'android.settings.TETHER_PROVISIONING_UI'; + const ACTION_TRUSTED_CREDENTIALS_USER: 'android.settings.TRUSTED_CREDENTIALS_USER'; + const ACTION_USAGE_ACCESS_SETTINGS: 'android.settings.USAGE_ACCESS_SETTINGS'; + const ACTION_USER_DICTIONARY_INSERT: 'android.settings.USER_DICTIONARY_INSERT'; + const ACTION_USER_DICTIONARY_SETTINGS: 'android.settings.USER_DICTIONARY_SETTINGS'; + const ACTION_USER_SETTINGS: 'android.settings.USER_SETTINGS'; + const ACTION_VOICE_CONTROL_AIRPLANE_MODE: 'android.settings.VOICE_CONTROL_AIRPLANE_MODE'; + const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE: 'android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE'; + const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE: 'android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE'; + const ACTION_VOICE_INPUT_SETTINGS: 'android.settings.VOICE_INPUT_SETTINGS'; + const ACTION_VPN_SETTINGS: 'android.settings.VPN_SETTINGS'; + const ACTION_VR_LISTENER_SETTINGS: 'android.settings.VR_LISTENER_SETTINGS'; + const ACTION_WEBVIEW_SETTINGS: 'android.settings.WEBVIEW_SETTINGS'; + const ACTION_WIFI_IP_SETTINGS: 'android.settings.WIFI_IP_SETTINGS'; + const ACTION_WIFI_SETTINGS: 'android.settings.WIFI_SETTINGS'; + const ACTION_WIRELESS_SETTINGS: 'android.settings.WIRELESS_SETTINGS'; + const ACTION_ZEN_MODE_AUTOMATION_SETTINGS: 'android.settings.ZEN_MODE_AUTOMATION_SETTINGS'; + const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS: 'android.settings.ZEN_MODE_EVENT_RULE_SETTINGS'; + const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS: 'android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS'; + const ACTION_ZEN_MODE_PRIORITY_SETTINGS: 'android.settings.ZEN_MODE_PRIORITY_SETTINGS'; + const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS: 'android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS'; + const ACTION_ZEN_MODE_SETTINGS: 'android.settings.ZEN_MODE_SETTINGS'; function startActivityAsync(activity: string, data?: HashMap): Promise; } @@ -1487,7 +1503,7 @@ declare namespace IntentLauncherAndroid { /** * KeepAwake */ -export class KeepAwake extends Component { +declare class KeepAwake extends Component { static activate(): void; static deactivate(): void; } @@ -1496,14 +1512,14 @@ export class KeepAwake extends Component { /** * LinearGradient */ -export interface LinearGradientProps { +declare interface LinearGradientProps { colors: string[]; start: [number, number]; end: [number, number]; locations: number[]; } -export class LinearGradient extends Component { } +declare class LinearGradient extends Component { } // #endregion /** @@ -1646,12 +1662,15 @@ declare namespace Permissions { 'camera' | 'contacts' | 'audioRecording'; type PermissionStatus = 'undetermined' | 'granted' | 'denied'; type PermissionExpires = 'never'; + interface PermissionDetailsLocationIOS { scope: 'whenInUse' | 'always'; } + interface PermissionDetailsLocationAndroid { scope: 'fine' | 'coarse' | 'none'; } + interface PermissionResponse { status: PermissionStatus; expires: PermissionExpires; @@ -1662,25 +1681,28 @@ declare namespace Permissions { function getAsync(type: PermissionType): Promise; function askAsync(type: PermissionType): Promise; - const CAMERA: string; - const CAMERA_ROLL: string; - const AUDIO_RECORDING: string; - const LOCATION: string; - const REMOTE_NOTIFICATIONS: string; - const NOTIFICATIONS: string; - const CONTACTS: string; + type RemoteNotificationPermission = 'remoteNotifications'; + + const CAMERA: 'camera'; + const CAMERA_ROLL: 'cameraRoll'; + const AUDIO_RECORDING: 'audioRecording'; + const LOCATION: 'location'; + const REMOTE_NOTIFICATIONS: RemoteNotificationPermission; + const NOTIFICATIONS: RemoteNotificationPermission; + const CONTACTS: 'contacts'; + const SYSTEM_BRIGHTNESS: 'systemBrightness'; } /** * Register Root Component */ -export function registerRootComponent(component: Component): Component; +declare function registerRootComponent(component: Component): void; /** * ScreenOrientation */ declare namespace ScreenOrientation { - interface Orientation { + interface Orientations { ALL: 'ALL'; ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN'; PORTRAIT: 'PORTRAIT'; @@ -1690,8 +1712,10 @@ declare namespace ScreenOrientation { LANDSCAPE_LEFT: 'LANDSCAPE_LEFT'; LANDSCAPE_RIGHT: 'LANDSCAPE_RIGHT'; } - const Orientation: Orientation; - function allow(orientation: string): void; + + const Orientation: Orientations; + + function allow(orientation: keyof Orientations): void; } /** @@ -1702,6 +1726,7 @@ declare namespace SecureStore { keychainService?: string; keychainAccessible?: number; } + function setItemAsync(key: string, value: string, options?: SecureStoreOptions): Promise; function getItemAsync(key: string, options?: SecureStoreOptions): Promise; function deleteItemAsync(key: string, options?: SecureStoreOptions): Promise; @@ -1796,7 +1821,7 @@ declare namespace SQLite { /** * Svg */ -export interface SvgCommonProps { +declare interface SvgCommonProps { fill?: string; fillOpacity?: number | string; stroke?: string; @@ -1824,75 +1849,75 @@ export interface SvgCommonProps { delayLongPress?: number; } -export interface SvgRectProps extends SvgCommonProps { +declare interface SvgRectProps extends SvgCommonProps { width: number | string; height: number | string; } -export interface SvgCircleProps extends SvgCommonProps { +declare interface SvgCircleProps extends SvgCommonProps { cx: number | string; cy: number | string; r: number | string; } -export interface SvgEllipseProps extends SvgCommonProps { +declare interface SvgEllipseProps extends SvgCommonProps { cx: number | string; cy: number | string; rx: number | string; ry: number | string; } -export interface SvgLineProps extends SvgCommonProps { +declare interface SvgLineProps extends SvgCommonProps { x1: number | string; y1: number | string; x2: number | string; y2: number | string; } -export interface SvgPolyProps extends SvgCommonProps { +declare interface SvgPolyProps extends SvgCommonProps { points: string; } -export interface SvgPathProps extends SvgCommonProps { +declare interface SvgPathProps extends SvgCommonProps { d: string; } -export interface SvgTextProps extends SvgCommonProps { +declare interface SvgTextProps extends SvgCommonProps { textAnchor?: string; fontSize?: number | string; fontWeight?: string; } -export interface SvgTSpanProps extends SvgTextProps { +declare interface SvgTSpanProps extends SvgTextProps { dx?: string; dy?: string; } -export interface SvgTextPathProps extends SvgCommonProps { +declare interface SvgTextPathProps extends SvgCommonProps { href?: string; startOffset?: string; } -export interface SvgUseProps extends SvgCommonProps { +declare interface SvgUseProps extends SvgCommonProps { href: string; x: number | string; y: number | string; } -export interface SvgSymbolProps extends SvgCommonProps { +declare interface SvgSymbolProps extends SvgCommonProps { viewBox: string; width: number | string; height: number | string; } -export interface SvgLinearGradientProps extends SvgCommonProps { +declare interface SvgLinearGradientProps extends SvgCommonProps { x1: number | string; x2: number | string; y1: number | string; y2: number | string; } -export interface SvgRadialGradientProps extends SvgCommonProps { +declare interface SvgRadialGradientProps extends SvgCommonProps { cx: number | string; cy: number | string; rx: number | string; @@ -1902,13 +1927,13 @@ export interface SvgRadialGradientProps extends SvgCommonProps { gradientUnits?: string; } -export interface SvgStopProps extends SvgCommonProps { +declare interface SvgStopProps extends SvgCommonProps { offset?: string; stopColor?: string; stopOpacity?: string; } -export class Svg extends Component<{ width: number, height: number }> { +declare class Svg extends Component<{ width: number, height: number }> { static Circle: ComponentClass; static ClipPath: ComponentClass; static Defs: ComponentClass; @@ -1933,7 +1958,7 @@ export class Svg extends Component<{ width: number, height: number }> { /** * Take Snapshot */ -export function takeSnapshotAsync( +declare function takeSnapshotAsync( view?: (number | React.ReactElement), options?: { width?: number, @@ -1968,30 +1993,30 @@ declare namespace Util { /** * Expo Video */ -export interface NaturalSize { +declare interface NaturalSize { width: number; height: number; orientation: Orientation; } -export interface ReadyForDisplayEvent { +declare interface ReadyForDisplayEvent { naturalSize: NaturalSize; status: PlaybackStatus; } -export enum FullscreenUpdateVariants { +declare enum FullscreenUpdateVariants { IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 } -export interface FullscreenUpdateEvent { +declare interface FullscreenUpdateEvent { fullscreenUpdate: FullscreenUpdateVariants; status: PlaybackStatus; } -export interface VideoProps { +declare interface VideoProps { source?: PlaybackSource | null; posterSource?: URISource | RequireSource; @@ -2025,11 +2050,11 @@ export interface VideoProps { ref?: Ref; } -export interface VideoState { +declare interface VideoState { showPoster: boolean; } -export class Video extends Component { +declare class Video extends Component { static RESIZE_MODE_CONTAIN: ResizeModeContain; static RESIZE_MODE_COVER: ResizeModeCover; static RESIZE_MODE_STRETCH: ResizeModeStretch; From a33a75d3bd66fc582968080fa4e68ae06776af9c Mon Sep 17 00:00:00 2001 From: KonstantinKai Date: Thu, 25 Jan 2018 11:01:04 +0200 Subject: [PATCH 24/52] [expo] linter fixes --- types/expo/expo-tests.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 1ea712f66b..b3e9384459 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -541,5 +541,5 @@ async () => { result.expires === 'never'; }; -ScreenOrientation.Orientation.ALL -ScreenOrientation.allow(ScreenOrientation.Orientation.ALL); \ No newline at end of file +ScreenOrientation.Orientation.ALL; +ScreenOrientation.allow(ScreenOrientation.Orientation.ALL); From 23b8640648e01e811de164b1a02d91dcc04b01e8 Mon Sep 17 00:00:00 2001 From: KonstantinKai Date: Fri, 26 Jan 2018 10:32:15 +0200 Subject: [PATCH 25/52] [expo] add correct type to registerRootComponent argument --- types/expo/expo-tests.tsx | 10 ++++++++++ types/expo/index.d.ts | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index b3e9384459..86e447caaa 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import { Text } from 'react-native'; import { Accelerometer, @@ -543,3 +544,12 @@ async () => { ScreenOrientation.Orientation.ALL; ScreenOrientation.allow(ScreenOrientation.Orientation.ALL); + +class __TestEntry__ extends React.Component { + render() { + return( + test + ); + } +} +registerRootComponent(__TestEntry__); diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 3c4e217147..deecbc23aa 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -7,7 +7,7 @@ // TypeScript Version: 2.4 import { EventSubscription } from 'fbemitter'; -import { Component, ComponentClass, Ref } from 'react'; +import { Component, ComponentClass, Ref, ComponentType } from 'react'; import { ColorPropType, ImageRequireSource, @@ -1696,7 +1696,7 @@ declare namespace Permissions { /** * Register Root Component */ -declare function registerRootComponent(component: Component): void; +declare function registerRootComponent(component: ComponentType): void; /** * ScreenOrientation From 65993d5e6f057f1d93c5a5f13ea1551bfdd3d19f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 7 Feb 2018 12:33:20 +0100 Subject: [PATCH 26/52] feat: add missing `addDevServerEntrypoints` in `API` --- types/webpack-dev-server/index.d.ts | 4 ++++ .../webpack-dev-server-tests.ts | 21 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/types/webpack-dev-server/index.d.ts b/types/webpack-dev-server/index.d.ts index 797ae437dc..c969dc9506 100644 --- a/types/webpack-dev-server/index.d.ts +++ b/types/webpack-dev-server/index.d.ts @@ -15,6 +15,10 @@ import * as spdy from 'spdy'; import * as httpProxyMiddleware from 'http-proxy-middleware'; declare namespace WebpackDevServer { + type ListeningApp = { address(): { port?: number } }; + + function addDevServerEntrypoints(webpack: webpack.Compiler | webpack.MultiCompiler, config: WebpackDevServer.Configuration, listeningApp?: ListeningApp): void + interface proxyConfigMap { [url: string]: string | httpProxyMiddleware.Config; } diff --git a/types/webpack-dev-server/webpack-dev-server-tests.ts b/types/webpack-dev-server/webpack-dev-server-tests.ts index a288ea51be..eee626ecec 100644 --- a/types/webpack-dev-server/webpack-dev-server-tests.ts +++ b/types/webpack-dev-server/webpack-dev-server-tests.ts @@ -75,7 +75,7 @@ const config: WebpackDevServer.Configuration = { // API example server = new WebpackDevServer(compiler, config); -server.listen(8080, "localhost", () => {}); +server.listen(8080, "localhost", () => { }); // HTTPS example server = new WebpackDevServer(compiler, { @@ -83,10 +83,25 @@ server = new WebpackDevServer(compiler, { https: true }); -server.listen(8080, "localhost", () => {}); +server.listen(8080, "localhost", () => { }); server.close(); -// multiple compilers +WebpackDevServer.addDevServerEntrypoints(compiler, { + publicPath: "/assets/", + https: true +}); +WebpackDevServer.addDevServerEntrypoints( + compiler, + { + publicPath: "/assets/", + https: true + }, + { + address: () => ({ port: 80 }) + } +); + +// multiple compilers server = new WebpackDevServer(multipleCompiler, config); From a418bdb31a70d01dbf10983f6d14ee9e29ac172e Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 7 Feb 2018 12:46:14 +0100 Subject: [PATCH 27/52] style(webpack-dev-server): fix lint issues --- types/webpack-dev-server/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/webpack-dev-server/index.d.ts b/types/webpack-dev-server/index.d.ts index c969dc9506..c07a2ec997 100644 --- a/types/webpack-dev-server/index.d.ts +++ b/types/webpack-dev-server/index.d.ts @@ -15,9 +15,11 @@ import * as spdy from 'spdy'; import * as httpProxyMiddleware from 'http-proxy-middleware'; declare namespace WebpackDevServer { - type ListeningApp = { address(): { port?: number } }; + interface ListeningApp { + address(): { port?: number }; + } - function addDevServerEntrypoints(webpack: webpack.Compiler | webpack.MultiCompiler, config: WebpackDevServer.Configuration, listeningApp?: ListeningApp): void + function addDevServerEntrypoints(webpack: webpack.Compiler | webpack.MultiCompiler, config: Configuration, listeningApp?: ListeningApp): void; interface proxyConfigMap { [url: string]: string | httpProxyMiddleware.Config; From d50e8ffa71a074414a3539e6024c5f5acbc88b7f Mon Sep 17 00:00:00 2001 From: Kohei Hasegawa Date: Thu, 8 Feb 2018 02:23:15 +0900 Subject: [PATCH 28/52] [cookie_js] Handle utils and defaults --- types/cookie_js/cookie_js-tests.ts | 20 ++++++++++++++++++++ types/cookie_js/index.d.ts | 25 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/types/cookie_js/cookie_js-tests.ts b/types/cookie_js/cookie_js-tests.ts index 51a71f4bab..b7e00f66a1 100644 --- a/types/cookie_js/cookie_js-tests.ts +++ b/types/cookie_js/cookie_js-tests.ts @@ -29,3 +29,23 @@ cookie.removeSpecific(['a', 'b'], {path: '/search'}); cookie.empty(); cookie.all(); + +cookie.utils; +cookie.utils.isArray('a'); +cookie.utils.isArray([]); +cookie.utils.isObject('a'); +cookie.utils.isObject({}); +cookie.utils.toArray({}); +cookie.utils.toArray([]); +cookie.utils.getKeys({}); +cookie.utils.encode('a'); +cookie.utils.decode('a'); +cookie.utils.retrieve('a', 'b'); + +cookie.defaults; +cookie.defaults.expires = 1; +cookie.defaults.expires = new Date; +cookie.defaults.expires = 'Wed, 07 Feb 2018 17:00:26 GMT'; +cookie.defaults.domain = 'example.com'; +cookie.defaults.path = '/foo'; +cookie.defaults.secure = true; diff --git a/types/cookie_js/index.d.ts b/types/cookie_js/index.d.ts index 6e5a0813b6..2f197253d6 100644 --- a/types/cookie_js/index.d.ts +++ b/types/cookie_js/index.d.ts @@ -17,6 +17,23 @@ declare module 'cookiejs' { declare function cookie(key : string, fallback?: string) : string; declare function cookie(keys : string[], fallback?: string) : string; +interface UtilStatic { + isArray: (value: any) => boolean; + isObject: (value: any) => boolean; + toArray: (...args: any[]) => any[]; + getKeys: (value: {}) => any[]; + encode: (value: string) => string; + decode: (value: string) => string; + retrieve: (x: string, y: string) => string; +} + +interface Options { + expires: number | string | Date, + domain: string, + path: string, + secure: boolean, +} + declare namespace cookie { /** * Create a cookie. The value will automatically be escaped. @@ -57,4 +74,12 @@ declare namespace cookie { * Test if cookies are enabled */ export function enabled() : boolean; + /** + * Utility methods + */ + export var utils: UtilStatic; + /** + * Set default options + */ + export var defaults: Options; } From 4b5437ecd413a12ee07eced426f4198c6a13c183 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 14 Feb 2018 09:06:10 +0100 Subject: [PATCH 29/52] webpack-dev-server: move `addDevServerEntrypoints` in class and mark it as static --- types/webpack-dev-server/index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/webpack-dev-server/index.d.ts b/types/webpack-dev-server/index.d.ts index c07a2ec997..31d5b42891 100644 --- a/types/webpack-dev-server/index.d.ts +++ b/types/webpack-dev-server/index.d.ts @@ -19,8 +19,6 @@ declare namespace WebpackDevServer { address(): { port?: number }; } - function addDevServerEntrypoints(webpack: webpack.Compiler | webpack.MultiCompiler, config: Configuration, listeningApp?: ListeningApp): void; - interface proxyConfigMap { [url: string]: string | httpProxyMiddleware.Config; } @@ -82,6 +80,12 @@ declare class WebpackDevServer { config: WebpackDevServer.Configuration ); + static addDevServerEntrypoints( + webpack: webpack.Compiler | webpack.MultiCompiler, + config: WebpackDevServer.Configuration, + listeningApp?: WebpackDevServer.ListeningApp + ): void; + listen(port: number, hostname: string, callback?: (error?: Error) => void): http.Server; listen(port: number, callback?: (error?: Error) => void): http.Server; From a6aea3ab811f6c41caa87f7d7d22ebe79a0ba52a Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 14 Feb 2018 09:23:21 +0100 Subject: [PATCH 30/52] webpack dev server: `addDevServerEntrypoints` change options types --- types/webpack-dev-server/index.d.ts | 2 +- types/webpack-dev-server/webpack-dev-server-tests.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/webpack-dev-server/index.d.ts b/types/webpack-dev-server/index.d.ts index 31d5b42891..c6bab12c3b 100644 --- a/types/webpack-dev-server/index.d.ts +++ b/types/webpack-dev-server/index.d.ts @@ -81,7 +81,7 @@ declare class WebpackDevServer { ); static addDevServerEntrypoints( - webpack: webpack.Compiler | webpack.MultiCompiler, + webpackOptions: webpack.Configuration | webpack.Configuration[], config: WebpackDevServer.Configuration, listeningApp?: WebpackDevServer.ListeningApp ): void; diff --git a/types/webpack-dev-server/webpack-dev-server-tests.ts b/types/webpack-dev-server/webpack-dev-server-tests.ts index eee626ecec..5a23a60ad7 100644 --- a/types/webpack-dev-server/webpack-dev-server-tests.ts +++ b/types/webpack-dev-server/webpack-dev-server-tests.ts @@ -87,13 +87,13 @@ server.listen(8080, "localhost", () => { }); server.close(); -WebpackDevServer.addDevServerEntrypoints(compiler, { +WebpackDevServer.addDevServerEntrypoints(config, { publicPath: "/assets/", https: true }); WebpackDevServer.addDevServerEntrypoints( - compiler, + [config], { publicPath: "/assets/", https: true From 296719ff185e6c5e8edf4d5d3afdcf422b01fd48 Mon Sep 17 00:00:00 2001 From: Mario Adrian Date: Wed, 14 Feb 2018 18:00:34 +0100 Subject: [PATCH 31/52] update --- types/jsonrpc-serializer/index.d.ts | 125 +++++++++++++++--- .../jsonrpc-serializer-tests.ts | 38 ++++++ 2 files changed, 143 insertions(+), 20 deletions(-) diff --git a/types/jsonrpc-serializer/index.d.ts b/types/jsonrpc-serializer/index.d.ts index 1f1b58551e..dd5210c23c 100644 --- a/types/jsonrpc-serializer/index.d.ts +++ b/types/jsonrpc-serializer/index.d.ts @@ -1,28 +1,113 @@ // Type definitions for jsonrpc-serializer 0.2 -// Project: https://github.com/soggie/jsonrpc-serializer#readme -// Definitions by: Akim95 +// Project: https://github.com/soggie/jsonrpc-serializer +// Definitions by: Akim95 , many20 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.5 -export function request(id: string | number, method: string, params?: T): string; -export function notification(method: string, params?: T): string; -export function success(id: string, result: T): string; -export function error(id: string, error: T): string; -export function deserialize(msg: string): T; -export function requestObject(id: string | number, method: string, params?: T): string; -export function notificationObject(method: string, params?: T): string; -export function successObject(id: string, result: T): string; -export function errorObject(id: string, error: T): string; -export function deserializeObject(msg: T): void; +export type PayloadType = 'request' | 'notification' | 'success' | 'error'; +// export const PayloadType = { +// request: 'request' as PayloadType, +// notification: 'notification' as PayloadType, +// success: 'success' as PayloadType, +// error: 'error' as PayloadType +// }; -export const errorHandler: any; +export interface DeserializeObject { + type: PayloadType; + payload: RequestPayloadObject | NotificationPayloadObject | SuccessPayloadObject | ErrorPayloadObject; +} + +export interface PayloadObject { + id?: string | number; + method?: string; + params?: any; + result?: any; + error?: SerializerError; +} + +export interface RequestPayloadObject extends PayloadObject { + id: string; + method: string; + params: any; +} + +export interface NotificationPayloadObject extends PayloadObject { + method: string; + params: any; +} + +export interface SuccessPayloadObject extends PayloadObject { + id: string | number; + result: any; +} + +export interface ErrorPayloadObject extends PayloadObject { + id: string | number; + error: SerializerError; +} + +export interface SerializerError extends Error { + name: string; + code: number; + message: string; + data?: any[]; +} + +export function request(id: string | number, method: string, params?: any): string; +export function notification(method: string, params?: any): string; +export function success(id: string | number, result: any): string; +export function error(id: string | number, error: err.JsonRpcError): string; +export function deserialize(msg: string): DeserializeObject; +export function requestObject(id: string | number, method: string, params?: any): PayloadObject; +export function notificationObject(method: string, params?: any): PayloadObject; +export function successObject(id: string | number, result: any): PayloadObject; +export function errorObject(id: string | number, error: SerializerError): PayloadObject; +export function deserializeObject(msg: PayloadObject): DeserializeObject; + +export type errorHandler = (errors: string[] | null) => void; export namespace err { - class JsonRpcError { - constructor(msg: string); - serialize(): any; + type ErrorName = 'JsonRpcError' | 'ParseError' | 'InvalidRequestError' | 'MethodNotFoundError' | 'InvalidParamsError'; + // const ErrorName = { + // JsonRpcError: 'JsonRpcError' as ErrorName, + // ParseError: 'ParseError' as ErrorName, + // InvalidRequestError: 'InvalidRequestError' as ErrorName, + // MethodNotFoundError: 'MethodNotFoundError' as ErrorName, + // InvalidParamsError: 'InvalidParamsError' as ErrorName + // }; + + type ErrorCode = -32603 | -32700 | -32600 | -32601 | -32602; + // const ErrorCode = { + // JsonRpcError: -32603 as ErrorCode, + // ParseError: -32700 as ErrorCode, + // InvalidRequestError: -32600 as ErrorCode, + // MethodNotFoundError: -32601 as ErrorCode, + // InvalidParamsError: -32602 as ErrorCode + // }; + + class JsonRpcError extends Error implements SerializerError { + name: string | ErrorName; + code: number | ErrorCode; + message: string; + data?: any[]; + + constructor(msg: string, ...args: any[]); + serialize(): string; + } + + class InvalidParamsError extends JsonRpcError { + constructor(...args: any[]); + } + + class InvalidRequestError extends JsonRpcError { + constructor(...args: any[]); + } + + class MethodNotFoundError extends JsonRpcError { + constructor(...args: any[]); + } + + class ParseError extends JsonRpcError { + constructor(...args: any[]); } - class InvalidParamsError {} - class InvalidRequestError {} - class MethodNotFoundError {} - class ParseError {} } diff --git a/types/jsonrpc-serializer/jsonrpc-serializer-tests.ts b/types/jsonrpc-serializer/jsonrpc-serializer-tests.ts index 83a6cc6f83..2a80ef1d97 100644 --- a/types/jsonrpc-serializer/jsonrpc-serializer-tests.ts +++ b/types/jsonrpc-serializer/jsonrpc-serializer-tests.ts @@ -1,3 +1,4 @@ +import * as uuid from 'node-uuid'; import * as jrs from 'jsonrpc-serializer'; // request tests @@ -46,3 +47,40 @@ const request = { jrs.deserialize(JSON.stringify(request)); jrs.deserializeObject(request); + +// --- + +const request2 = jrs.request('request-id', 'request-method'); + +// ---> "{\"jsonrpc\":\"2.0\",\"id\":\"request-id\",\"method:\":\"request-method\"}" + +const ok1 = "{\"jsonrpc\":\"2.0\",\"id\":\"request-id\",\"result\":\"success!!\"}"; + +const response1 = jrs.deserialize(ok1); + +// --- + +const payload2 = jrs.request( + uuid.v4(), // generates a V4 UUID string + 'saveUser', // the method to call + { + name : 'Ruben Tan', + email : 'foo@bar.com', + race : 'unicorn' + } +); + +// --- + +const payload3 = jrs.notification( + 'newMessage', // the method to call + { + subject : 'Test message', + message : 'This is a test message' + } +); + +// --- + +const err1 = new jrs.err.JsonRpcError('This is an error'); +const str1 = err1.serialize(); From 15398d85cf46da56204beac300dca2031672ed1e Mon Sep 17 00:00:00 2001 From: Mario Adrian Date: Thu, 15 Feb 2018 16:12:19 +0100 Subject: [PATCH 32/52] update type definitions --- types/odata/index.d.ts | 21 +++++++++++++++------ types/odata/odata-tests.ts | 6 +++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/types/odata/index.d.ts b/types/odata/index.d.ts index 349d48763b..50abbde764 100644 --- a/types/odata/index.d.ts +++ b/types/odata/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for odata v0.3.4 +// Type definitions for odata v0.3 // Project: https://github.com/janhommes/odata // Definitions by: Jan Hommes , Jean-Christophe Chalte // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -26,14 +26,17 @@ declare module 'odata' { } interface OHandler { - inlinecount : number - data : T + inlinecount: number; // if inlinecount is set, here the counting is gold + data: T; // holds the data after an callback + param: {}; // this object holds all parameter for a route + oConfig: Options; // the internal config, passed over from the o function config(options ?: Options) : OHandler progress(callback : () => any) : OHandler - get(callback ?: (data : T) => void) : Q.Promise> - save(callback ?: (data : T) => void) : Q.Promise> + get(callback ?: (data : T) => void, errorCallback?: (status: number) => void) : Q.Promise> + save(callback ?: (data : T) => void, errorCallback?: (status: number) => void) : Q.Promise> + query: () => string; post(params : any) : OHandler patch(params : any) : OHandler @@ -78,8 +81,14 @@ declare module 'odata' { deleteRef(resource : string, id : string | number) : OHandler } + interface OHandlerStatic { + config: (config: Options) => OHandlerStatic; + isEndpoint: () => boolean; + } + interface OFn extends OHandler { - (options ?: string | Options) : OHandler + (): OHandlerStatic; + (options?: string | Options): OHandler; } var o : OFn<{}>; diff --git a/types/odata/odata-tests.ts b/types/odata/odata-tests.ts index 522dc3d529..01d62c9687 100644 --- a/types/odata/odata-tests.ts +++ b/types/odata/odata-tests.ts @@ -20,6 +20,8 @@ interface Category { o('http://services.odata.org/V4/OData/OData.svc/Products') .get(function(data) { console.log(data); //returns an array of Product data + }, function(status) { + console.error(status); // error with status }); @@ -132,7 +134,9 @@ o('Products').get(function(data) { //same result like the first example on this page }); - +const oEequest = o('http://services.odata.org/V4/OData/OData.svc/Products') + .find(2); +const queryString = oEequest.query(); //basic config o().config({ From 5674e143e867684b748e7e62047bedef56d801de Mon Sep 17 00:00:00 2001 From: Mario Adrian Date: Thu, 15 Feb 2018 16:33:58 +0100 Subject: [PATCH 33/52] update OHandlerStatic --- types/odata/index.d.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/types/odata/index.d.ts b/types/odata/index.d.ts index 50abbde764..64021049e9 100644 --- a/types/odata/index.d.ts +++ b/types/odata/index.d.ts @@ -82,16 +82,13 @@ declare module 'odata' { } interface OHandlerStatic { + (): OHandlerStatic; + (options?: string | Options): OHandler<{}>; config: (config: Options) => OHandlerStatic; isEndpoint: () => boolean; } - interface OFn extends OHandler { - (): OHandlerStatic; - (options?: string | Options): OHandler; - } - - var o : OFn<{}>; + var o : OHandlerStatic; export = o } \ No newline at end of file From 034b02869d8f77480f68fc9b9ff3d703831293d0 Mon Sep 17 00:00:00 2001 From: Mario Adrian Date: Thu, 15 Feb 2018 16:40:32 +0100 Subject: [PATCH 34/52] update --- types/odata/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/odata/index.d.ts b/types/odata/index.d.ts index 64021049e9..e56ac4296c 100644 --- a/types/odata/index.d.ts +++ b/types/odata/index.d.ts @@ -29,7 +29,6 @@ declare module 'odata' { inlinecount: number; // if inlinecount is set, here the counting is gold data: T; // holds the data after an callback param: {}; // this object holds all parameter for a route - oConfig: Options; // the internal config, passed over from the o function config(options ?: Options) : OHandler progress(callback : () => any) : OHandler From c9d4417cae748ecce79d215e3e064e203930c887 Mon Sep 17 00:00:00 2001 From: Mario Adrian Date: Thu, 15 Feb 2018 17:33:16 +0100 Subject: [PATCH 35/52] changed test --- types/odata/odata-tests.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/types/odata/odata-tests.ts b/types/odata/odata-tests.ts index 01d62c9687..2bb33d2ee6 100644 --- a/types/odata/odata-tests.ts +++ b/types/odata/odata-tests.ts @@ -114,12 +114,14 @@ o('http://services.odata.org/V4/OData/OData.svc/Products(1)') o('http://services.odata.org/V4/OData/OData.svc/Products') .find(2) .get() - .then(function(oHandler) { - oHandler.data.Name="NewName"; - return(o.save()); - }).then(function(oHandler) { - console.log(oHandler.data.Name); //NewName - }).fail(function(ex) { + .then(function(data) { + data.value[0].Name="NewName"; + return(this.save()); + }) + .then(function(data) { + console.log(data.value[0].Name); //NewName + }) + .fail(function(ex) { console.log("error"); }); From 6618b48a1e5b56bbdd6da13d5b00f1b0f485bdd5 Mon Sep 17 00:00:00 2001 From: Mario Adrian Date: Thu, 15 Feb 2018 17:50:56 +0100 Subject: [PATCH 36/52] rollback --- types/odata/odata-tests.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/types/odata/odata-tests.ts b/types/odata/odata-tests.ts index 2bb33d2ee6..a82122687c 100644 --- a/types/odata/odata-tests.ts +++ b/types/odata/odata-tests.ts @@ -72,7 +72,8 @@ o('http://services.odata.org/V4/OData/OData.svc/Products(2)') .get() .then(function(oHandler) { console.log(oHandler.data); - }).fail(function(ex) { + }) + .fail(function(ex) { console.log(ex); }); @@ -114,12 +115,12 @@ o('http://services.odata.org/V4/OData/OData.svc/Products(1)') o('http://services.odata.org/V4/OData/OData.svc/Products') .find(2) .get() - .then(function(data) { - data.value[0].Name="NewName"; - return(this.save()); + .then(function(oHandler) { + oHandler.data.Name="NewName"; + return(oHandler.save()); }) - .then(function(data) { - console.log(data.value[0].Name); //NewName + .then(function(oHandler) { + console.log(oHandler.data.Name); //NewName }) .fail(function(ex) { console.log("error"); @@ -139,6 +140,9 @@ o('Products').get(function(data) { const oEequest = o('http://services.odata.org/V4/OData/OData.svc/Products') .find(2); const queryString = oEequest.query(); +if (queryString !== 'http://services.odata.org/V4/OData/OData.svc/Products(2)') { + throw new Error('assert error'); +} //basic config o().config({ From 5daf5ac69f5f3ea0fc15648a02eeff2c7186c121 Mon Sep 17 00:00:00 2001 From: Matias Ribichich Date: Thu, 15 Feb 2018 19:11:14 -0300 Subject: [PATCH 37/52] Updated add function to v3.1.1 --- types/moment-range/index.d.ts | 4 ++-- types/moment-range/moment-range-tests.ts | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/types/moment-range/index.d.ts b/types/moment-range/index.d.ts index e0298abd8e..18538e5c6d 100644 --- a/types/moment-range/index.d.ts +++ b/types/moment-range/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Moment-range.js 3.0 +// Type definitions for Moment-range.js 3.1 // Project: https://github.com/gf3/moment-range // Definitions by: Bart van den Burg // Wilgert Velinga @@ -21,7 +21,7 @@ export class DateRange { intersect(other: DateRange): DateRange; - add(other: DateRange): DateRange; + add(other: DateRange, options?: { adjacent?: boolean }): DateRange; subtract(other: DateRange): DateRange[]; diff --git a/types/moment-range/moment-range-tests.ts b/types/moment-range/moment-range-tests.ts index fc9a8b6e12..cbd55ef183 100644 --- a/types/moment-range/moment-range-tests.ts +++ b/types/moment-range/moment-range-tests.ts @@ -60,18 +60,20 @@ const it10: Iterable = range.reverseByRange(range, { exclusive: t const it11: Iterable = range.reverseByRange(range, { exclusive: false, step: 2 }); const res23: momentRange.DateRange = range.add(range2); +const res24: momentRange.DateRange = range.add(range2, {adjacent: true}); +const res25: momentRange.DateRange = range.add(range2, {adjacent: false}); -const res24: momentRange.DateRange[] = range.subtract(range2); +const res26: momentRange.DateRange[] = range.subtract(range2); -const res25: Date[] = range.toDate(); +const res27: Date[] = range.toDate(); -const res26: string = range.toString(); +const res28: string = range.toString(); -const res27: number = range.valueOf(); +const res29: number = range.valueOf(); -const res28: moment.Moment = range.start; -const res29: moment.Moment = range.end; +const res30: moment.Moment = range.start; +const res31: moment.Moment = range.end; -const res30: boolean = extendedMoment.within(range); -const res31: boolean = extendedMoment().within(range); -const res32: momentRange.DateRange = extendedMoment().range(moment("2011-04-15", "YYYY-MM-DD"), moment("2011-11-27", "YYYY-MM-DD")); +const res32: boolean = extendedMoment.within(range); +const res33: boolean = extendedMoment().within(range); +const res34: momentRange.DateRange = extendedMoment().range(moment("2011-04-15", "YYYY-MM-DD"), moment("2011-11-27", "YYYY-MM-DD")); From 7be938ddc67d381c4274b9deb852adb96dc5bace Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Thu, 15 Feb 2018 15:39:25 -0700 Subject: [PATCH 38/52] Ember: make `get` unwrap module computed properties. --- types/ember/index.d.ts | 3 ++- types/ember/test/computed.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index 4a3d7d45d1..349eb0f827 100755 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -20,6 +20,7 @@ declare module 'ember' { import { Registry as ServiceRegistry } from '@ember/service'; import { Registry as ControllerRegistry } from '@ember/controller'; + import ModuleComputed from '@ember/object/computed'; // Get an alias to the global Array type to use in inner scope below. type GlobalArray = T[]; @@ -27,7 +28,7 @@ declare module 'ember' { /** * Deconstructs computed properties into the types which would be returned by `.get()`. */ - type ComputedProperties = { [K in keyof T]: Ember.ComputedProperty | T[K] }; + type ComputedProperties = { [K in keyof T]: Ember.ComputedProperty | ModuleComputed | T[K] }; /** * Check that any arguments to `create()` match the type's properties. diff --git a/types/ember/test/computed.ts b/types/ember/test/computed.ts index c812ef62b3..f93b07a0f5 100755 --- a/types/ember/test/computed.ts +++ b/types/ember/test/computed.ts @@ -1,6 +1,6 @@ import Ember from 'ember'; import Component from '@ember/component'; -import { or } from '@ember/object/computed'; +import Computed, { alias, or } from '@ember/object/computed'; import { assertType } from './lib/assert'; const Person = Ember.Object.extend({ @@ -50,7 +50,9 @@ const Person = Ember.Object.extend({ }).property('firstName') .meta({ foo: 'bar' }) .volatile() - .readOnly() + .readOnly(), + + explicitlyDeclared: alias('fullName') as Computed, }); const person = Person.create({ @@ -68,6 +70,7 @@ assertType>(person.fullNameWritable); assertType>(person.fullNameGetOnly); assertType>(person.fullNameSetOnly); assertType>(person.combinators); +assertType>(person.explicitlyDeclared); assertType(person.get('firstName')); assertType(person.get('age')); @@ -78,6 +81,7 @@ assertType(person.get('fullNameWritable')); assertType(person.get('fullNameGetOnly')); assertType(person.get('fullNameSetOnly')); assertType(person.get('combinators')); +assertType(person.get('explicitlyDeclared')); assertType<{ firstName: string, fullName: string, age: number }>(person.getProperties('firstName', 'fullName', 'age')); From 76e272a90667bc2f056769fc8922df61a0785b1d Mon Sep 17 00:00:00 2001 From: KonstantinKai Date: Fri, 16 Feb 2018 10:27:19 +0200 Subject: [PATCH 39/52] [expo] replace declare to export --- types/expo/index.d.ts | 182 ++++++++++++++++++++--------------------- types/expo/tslint.json | 1 - 2 files changed, 91 insertions(+), 92 deletions(-) diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 491b4c5093..69a56b1a56 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -19,21 +19,21 @@ import { Permission } from 'react-native'; -type Axis = number; -type BarCodeReadCallback = (params: { type: string; data: string; }) => void; -type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; -type Md5 = string; -type Orientation = 'portrait' | 'landscape'; -type RequireSource = ImageRequireSource; -type ResizeModeContain = 'contain'; -type ResizeModeCover = 'cover'; -type ResizeModeStretch = 'stretch'; -type URISource = ImageURISource; +export type Axis = number; +export type BarCodeReadCallback = (params: { type: string; data: string; }) => void; +export type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; +export type Md5 = string; +export type Orientation = 'portrait' | 'landscape'; +export type RequireSource = ImageRequireSource; +export type ResizeModeContain = 'contain'; +export type ResizeModeCover = 'cover'; +export type ResizeModeStretch = 'stretch'; +export type URISource = ImageURISource; -interface HashMap { [key: string]: any; } +export interface HashMap { [key: string]: any; } /** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ -declare namespace Accelerometer { +export namespace Accelerometer { interface AccelerometerObject { x: Axis; y: Axis; @@ -62,7 +62,7 @@ declare namespace Accelerometer { * * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. */ -declare namespace Amplitude { +export namespace Amplitude { /** Initializes Amplitude with your Amplitude API key. */ function initialize(apiKey: string): void; @@ -98,7 +98,7 @@ declare namespace Amplitude { // #region AppLoading /** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ -declare type AppLoadingProps = { +export type AppLoadingProps = { /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ startAsync: () => Promise; @@ -118,11 +118,11 @@ declare type AppLoadingProps = { * * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. */ -declare class AppLoading extends Component { } +export class AppLoading extends Component { } // #endregion AppLoading /** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ -declare class Asset { +export class Asset { constructor({ name, type, hash, uri, width, height }: { name: string; type: string; @@ -175,7 +175,7 @@ declare class Asset { * * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. */ -declare namespace Audio { +export namespace Audio { enum InterruptionModeIos { /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, @@ -418,7 +418,7 @@ declare namespace Audio { /** * AuthSession */ -declare namespace AuthSession { +export namespace AuthSession { type StartAsyncResponse = { type: 'cancel'; } | { @@ -443,7 +443,7 @@ declare namespace AuthSession { /** * AV */ -declare type PlaybackStatus = { +export type PlaybackStatus = { isLoaded: false; androidImplementation?: string; @@ -470,7 +470,7 @@ declare type PlaybackStatus = { didJustFinish: boolean; }; -declare interface PlaybackStatusToSet { +export interface PlaybackStatusToSet { androidImplementation?: string; progressUpdateIntervalMillis?: number; positionMillis?: number; @@ -482,9 +482,9 @@ declare interface PlaybackStatusToSet { isLooping?: boolean; } -type PlaybackSource = RequireSource | { uri: string } | Asset; +export type PlaybackSource = RequireSource | { uri: string } | Asset; -declare class PlaybackObject { +export class PlaybackObject { /** * Gets the `PlaybackStatus` of the `playbackObject`. * @@ -625,31 +625,31 @@ declare class PlaybackObject { /** * BarCodeScanner */ -declare interface BarCodeScannerProps extends ViewProperties { +export interface BarCodeScannerProps extends ViewProperties { type?: 'front' | 'back'; torchMode?: 'on' | 'off'; barCodeTypes?: string[]; onBarCodeRead?: BarCodeReadCallback; } -declare class BarCodeScanner extends Component { } +export class BarCodeScanner extends Component { } // #endregion // #region BlurView /** * BlurView */ -declare interface BlurViewProps extends ViewProperties { +export interface BlurViewProps extends ViewProperties { tint: 'light' | 'default' | 'dark'; intensity: number; } -declare class BlurView extends Component { } +export class BlurView extends Component { } // #endregion /** * Brightness */ -declare namespace Brightness { +export namespace Brightness { function setBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; function getBrightnessAsync(): Promise; function getSystemBrightnessAsync(): Promise; @@ -660,11 +660,11 @@ declare namespace Brightness { /** * Camera */ -declare interface PictureOptions { +export interface PictureOptions { quality?: number; } -declare interface PictureResponse { +export interface PictureResponse { uri: string; width: number; height: number; @@ -672,20 +672,20 @@ declare interface PictureResponse { base64: string; } -declare interface RecordingOptions { +export interface RecordingOptions { quality?: string | number; maxDuration?: number; maxFileSize?: number; } -declare class CameraObject { +export class CameraObject { takePictureAsync(options: PictureOptions): Promise; recordAsync(options: RecordingOptions): Promise<{ uri: string; }>; stopRecording(): void; getSupportedRatiosAsync(): Promise; // Android only } -declare interface CameraProps extends ViewProperties { +export interface CameraProps extends ViewProperties { flashMode?: string | number; type?: string | number; ratio?: string; @@ -700,7 +700,7 @@ declare interface CameraProps extends ViewProperties { ref?: Ref; } -interface CameraConstants { +export interface CameraConstants { readonly Type: string; readonly FlashMode: string; readonly AutoFocus: string; @@ -709,7 +709,7 @@ interface CameraConstants { readonly BarCodeType: string; } -declare class Camera extends Component { +export class Camera extends Component { static readonly Constants: CameraConstants; } // #endregion @@ -717,7 +717,7 @@ declare class Camera extends Component { /** * Constants */ -declare namespace Constants { +export namespace Constants { const appOwnership: 'expo' | 'standalone' | 'guest'; const expoVersion: string; const deviceId: string; @@ -835,7 +835,7 @@ declare namespace Constants { /** * Contacts */ -declare namespace Contacts { +export namespace Contacts { type PhoneNumbers = 'phoneNumbers'; type Emails = 'emails'; type Addresses = 'addresses'; @@ -985,7 +985,7 @@ declare namespace Contacts { /** * DocumentPicker */ -declare namespace DocumentPicker { +export namespace DocumentPicker { interface Options { type?: string; } @@ -1005,14 +1005,14 @@ declare namespace DocumentPicker { /** * ErrorRecovery */ -declare namespace ErrorRecovery { +export namespace ErrorRecovery { function setRecoveryProps(props: HashMap): void; } /** * Facebook */ -declare namespace Facebook { +export namespace Facebook { interface Options { permissions?: string[]; behavior?: 'web' | 'native' | 'browser' | 'system'; @@ -1028,7 +1028,7 @@ declare namespace Facebook { /** * Facebook Ads */ -declare namespace FacebookAds { +export namespace FacebookAds { /** * Interstitial Ads */ @@ -1088,7 +1088,7 @@ declare namespace FacebookAds { /** * FaceDetector */ -declare namespace FaceDetector { +export namespace FaceDetector { interface Point { x: Axis; y: Axis; @@ -1157,7 +1157,7 @@ declare namespace FaceDetector { /** * FileSystem */ -declare namespace FileSystem { +export namespace FileSystem { type FileInfo = { exists: true; isDirectory: boolean; @@ -1233,7 +1233,7 @@ declare namespace FileSystem { } /** Use TouchID/FaceID (iOS) or the Fingerprint API (Android) to authenticate the user with a fingerprint scan. */ -declare namespace Fingerprint { +export namespace Fingerprint { type FingerprintAuthenticationResult = { success: true } | { @@ -1263,7 +1263,7 @@ declare namespace Fingerprint { /** * Font */ -declare namespace Font { +export namespace Font { interface FontMap { [name: string]: RequireSource; } @@ -1276,18 +1276,18 @@ declare namespace Font { /** * GLView */ -declare interface GLViewProps extends ViewProperties { +export interface GLViewProps extends ViewProperties { onContextCreate(): void; msaaSamples: number; } -declare class GLView extends Component { } +export class GLView extends Component { } // #endregion /** * Google */ -declare namespace Google { +export namespace Google { interface LogInConfig { androidClientId?: string; androidStandaloneAppClientId?: string; @@ -1320,7 +1320,7 @@ declare namespace Google { } /** Access the device gyroscope sensor to respond to changes in rotation in 3d space. */ -declare namespace Gyroscope { +export namespace Gyroscope { interface GyroscopeObject { x: Axis; y: Axis; @@ -1340,7 +1340,7 @@ declare namespace Gyroscope { /** * ImageManipulator */ -declare namespace ImageManipulator { +export namespace ImageManipulator { interface ImageResult { uri: string; width: number; @@ -1374,7 +1374,7 @@ declare namespace ImageManipulator { /** * Image Picker */ -declare namespace ImagePicker { +export namespace ImagePicker { interface ImageInfo { uri: string; width: number; @@ -1412,7 +1412,7 @@ declare namespace ImagePicker { /** * IntentLauncherAndroid */ -declare namespace IntentLauncherAndroid { +export namespace IntentLauncherAndroid { const ACTION_ACCESSIBILITY_SETTINGS: 'android.settings.ACCESSIBILITY_SETTINGS'; const ACTION_APP_NOTIFICATION_REDACTION: 'android.settings.ACTION_APP_NOTIFICATION_REDACTION'; const ACTION_CONDITION_PROVIDER_SETTINGS: 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS'; @@ -1500,7 +1500,7 @@ declare namespace IntentLauncherAndroid { /** * KeepAwake */ -declare class KeepAwake extends Component { +export class KeepAwake extends Component { static activate(): void; static deactivate(): void; } @@ -1509,20 +1509,20 @@ declare class KeepAwake extends Component { /** * LinearGradient */ -declare interface LinearGradientProps { +export interface LinearGradientProps { colors: string[]; start: [number, number]; end: [number, number]; locations: number[]; } -declare class LinearGradient extends Component { } +export class LinearGradient extends Component { } // #endregion /** * Location */ -declare namespace Location { +export namespace Location { interface LocationOptions { enableHighAccuracy?: boolean; timeInterval?: number; @@ -1584,7 +1584,7 @@ declare namespace Location { /** * Magnetometer */ -declare namespace Magnetometer { +export namespace Magnetometer { interface MagnetometerObject { x: Axis; y: Axis; @@ -1599,7 +1599,7 @@ declare namespace Magnetometer { /** * Notifications */ -declare namespace Notifications { +export namespace Notifications { interface Notification { origin: 'selected' | 'received'; data: any; @@ -1645,7 +1645,7 @@ declare namespace Notifications { /** * Pedometer */ -declare namespace Pedometer { +export namespace Pedometer { function isAvailableAsync(): Promise; function getStepCountAsync(start: Date, end: Date): Promise<{ steps: number; }>; function watchStepCount(callback: (params: { steps: number; }) => void): EventSubscription; @@ -1654,7 +1654,7 @@ declare namespace Pedometer { /** * Permissions */ -declare namespace Permissions { +export namespace Permissions { type PermissionType = 'remoteNotifications' | 'location' | 'camera' | 'contacts' | 'audioRecording'; type PermissionStatus = 'undetermined' | 'granted' | 'denied'; @@ -1693,12 +1693,12 @@ declare namespace Permissions { /** * Register Root Component */ -declare function registerRootComponent(component: ComponentType): void; +export function registerRootComponent(component: ComponentType): void; /** * ScreenOrientation */ -declare namespace ScreenOrientation { +export namespace ScreenOrientation { interface Orientations { ALL: 'ALL'; ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN'; @@ -1718,7 +1718,7 @@ declare namespace ScreenOrientation { /** * SecureStore */ -declare namespace SecureStore { +export namespace SecureStore { interface SecureStoreOptions { keychainService?: string; keychainAccessible?: number; @@ -1732,7 +1732,7 @@ declare namespace SecureStore { /** * Segment */ -declare namespace Segment { +export namespace Segment { function initialize(keys: { androidWriteKey: string; iosWriteKey: string; @@ -1750,7 +1750,7 @@ declare namespace Segment { /** * Speech */ -declare namespace Speech { +export namespace Speech { interface SpeechOptions { language?: string; pitch?: number; @@ -1769,7 +1769,7 @@ declare namespace Speech { /** * SQLite */ -declare namespace SQLite { +export namespace SQLite { type Error = any; interface Database { @@ -1818,7 +1818,7 @@ declare namespace SQLite { /** * Svg */ -declare interface SvgCommonProps { +export interface SvgCommonProps { fill?: string; fillOpacity?: number | string; stroke?: string; @@ -1846,75 +1846,75 @@ declare interface SvgCommonProps { delayLongPress?: number; } -declare interface SvgRectProps extends SvgCommonProps { +export interface SvgRectProps extends SvgCommonProps { width: number | string; height: number | string; } -declare interface SvgCircleProps extends SvgCommonProps { +export interface SvgCircleProps extends SvgCommonProps { cx: number | string; cy: number | string; r: number | string; } -declare interface SvgEllipseProps extends SvgCommonProps { +export interface SvgEllipseProps extends SvgCommonProps { cx: number | string; cy: number | string; rx: number | string; ry: number | string; } -declare interface SvgLineProps extends SvgCommonProps { +export interface SvgLineProps extends SvgCommonProps { x1: number | string; y1: number | string; x2: number | string; y2: number | string; } -declare interface SvgPolyProps extends SvgCommonProps { +export interface SvgPolyProps extends SvgCommonProps { points: string; } -declare interface SvgPathProps extends SvgCommonProps { +export interface SvgPathProps extends SvgCommonProps { d: string; } -declare interface SvgTextProps extends SvgCommonProps { +export interface SvgTextProps extends SvgCommonProps { textAnchor?: string; fontSize?: number | string; fontWeight?: string; } -declare interface SvgTSpanProps extends SvgTextProps { +export interface SvgTSpanProps extends SvgTextProps { dx?: string; dy?: string; } -declare interface SvgTextPathProps extends SvgCommonProps { +export interface SvgTextPathProps extends SvgCommonProps { href?: string; startOffset?: string; } -declare interface SvgUseProps extends SvgCommonProps { +export interface SvgUseProps extends SvgCommonProps { href: string; x: number | string; y: number | string; } -declare interface SvgSymbolProps extends SvgCommonProps { +export interface SvgSymbolProps extends SvgCommonProps { viewBox: string; width: number | string; height: number | string; } -declare interface SvgLinearGradientProps extends SvgCommonProps { +export interface SvgLinearGradientProps extends SvgCommonProps { x1: number | string; x2: number | string; y1: number | string; y2: number | string; } -declare interface SvgRadialGradientProps extends SvgCommonProps { +export interface SvgRadialGradientProps extends SvgCommonProps { cx: number | string; cy: number | string; rx: number | string; @@ -1924,13 +1924,13 @@ declare interface SvgRadialGradientProps extends SvgCommonProps { gradientUnits?: string; } -declare interface SvgStopProps extends SvgCommonProps { +export interface SvgStopProps extends SvgCommonProps { offset?: string; stopColor?: string; stopOpacity?: string; } -declare class Svg extends Component<{ width: number, height: number }> { +export class Svg extends Component<{ width: number, height: number }> { static Circle: ComponentClass; static ClipPath: ComponentClass; static Defs: ComponentClass; @@ -1955,7 +1955,7 @@ declare class Svg extends Component<{ width: number, height: number }> { /** * Take Snapshot */ -declare function takeSnapshotAsync( +export function takeSnapshotAsync( view?: (number | React.ReactElement), options?: { width?: number, @@ -1967,7 +1967,7 @@ declare function takeSnapshotAsync( ): Promise; /** Helpful utility functions that don’t fit anywhere else, including some localization and internationalization methods. */ -declare namespace Util { +export namespace Util { /** Returns the current device country code. */ function getCurrentDeviceCountryAsync(): Promise; @@ -1990,30 +1990,30 @@ declare namespace Util { /** * Expo Video */ -declare interface NaturalSize { +export interface NaturalSize { width: number; height: number; orientation: Orientation; } -declare interface ReadyForDisplayEvent { +export interface ReadyForDisplayEvent { naturalSize: NaturalSize; status: PlaybackStatus; } -declare enum FullscreenUpdateVariants { +export enum FullscreenUpdateVariants { IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 } -declare interface FullscreenUpdateEvent { +export interface FullscreenUpdateEvent { fullscreenUpdate: FullscreenUpdateVariants; status: PlaybackStatus; } -declare interface VideoProps { +export interface VideoProps { source?: PlaybackSource | null; posterSource?: URISource | RequireSource; @@ -2047,11 +2047,11 @@ declare interface VideoProps { ref?: Ref; } -declare interface VideoState { +export interface VideoState { showPoster: boolean; } -declare class Video extends Component { +export class Video extends Component { static RESIZE_MODE_CONTAIN: ResizeModeContain; static RESIZE_MODE_COVER: ResizeModeCover; static RESIZE_MODE_STRETCH: ResizeModeStretch; @@ -2065,7 +2065,7 @@ declare class Video extends Component { /** * Web Browser */ -declare namespace WebBrowser { +export namespace WebBrowser { function openBrowserAsync(url: string): Promise<{ type: 'cancelled' | 'dismissed' }>; function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; function dismissBrowser(): Promise<{ type: 'dismissed' }>; diff --git a/types/expo/tslint.json b/types/expo/tslint.json index b88d2896cb..8270136207 100644 --- a/types/expo/tslint.json +++ b/types/expo/tslint.json @@ -1,7 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "strict-export-declare-modifiers": false, "void-return": false, "max-line-length": false } From 95a2814436c2d1ab4ba01b915391ef89c8c42fdd Mon Sep 17 00:00:00 2001 From: "Cedric.Cazin" Date: Wed, 14 Feb 2018 12:09:37 +0100 Subject: [PATCH 40/52] Added declarations for 'mongo-sanitize'. --- types/mongo-sanitize/index.d.ts | 9 ++++++++ types/mongo-sanitize/mongo-sanitize-tests.ts | 11 +++++++++ types/mongo-sanitize/tsconfig.json | 24 ++++++++++++++++++++ types/mongo-sanitize/tslint.json | 1 + 4 files changed, 45 insertions(+) create mode 100644 types/mongo-sanitize/index.d.ts create mode 100644 types/mongo-sanitize/mongo-sanitize-tests.ts create mode 100644 types/mongo-sanitize/tsconfig.json create mode 100644 types/mongo-sanitize/tslint.json diff --git a/types/mongo-sanitize/index.d.ts b/types/mongo-sanitize/index.d.ts new file mode 100644 index 0000000000..44c5d04a7d --- /dev/null +++ b/types/mongo-sanitize/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for mongo-sanitize 1.0 +// Project: https://github.com/vkarpov15/mongo-sanitize +// Definitions by: Cedric Cazin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +export function sanitize(v: T): T; + +export as namespace mongoSanitize; diff --git a/types/mongo-sanitize/mongo-sanitize-tests.ts b/types/mongo-sanitize/mongo-sanitize-tests.ts new file mode 100644 index 0000000000..4d4534bbeb --- /dev/null +++ b/types/mongo-sanitize/mongo-sanitize-tests.ts @@ -0,0 +1,11 @@ +import * as mongoSanitize from 'mongo-sanitize'; + +const objectSanitized = mongoSanitize.sanitize({ $gt: 5, a: 1 }); + +const arraySanitized = mongoSanitize.sanitize([1, 2, 3]); + +class Clazz { + $gt = 5; + a = 1; +} +const classSanitized = mongoSanitize.sanitize(new Clazz()); diff --git a/types/mongo-sanitize/tsconfig.json b/types/mongo-sanitize/tsconfig.json new file mode 100644 index 0000000000..231a306a62 --- /dev/null +++ b/types/mongo-sanitize/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "mongo-sanitize-tests.ts" + ] +} diff --git a/types/mongo-sanitize/tslint.json b/types/mongo-sanitize/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mongo-sanitize/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b2f965106c4fb0941472e347bfb5c26e915384aa Mon Sep 17 00:00:00 2001 From: Moe Elsharif Date: Fri, 16 Feb 2018 14:26:29 +0100 Subject: [PATCH 41/52] Update Input.d.ts --- types/reactstrap/lib/Input.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/reactstrap/lib/Input.d.ts b/types/reactstrap/lib/Input.d.ts index c5827f9a75..7236e02fa6 100644 --- a/types/reactstrap/lib/Input.d.ts +++ b/types/reactstrap/lib/Input.d.ts @@ -1,6 +1,6 @@ import { CSSModule } from '../index'; -type InputType = +export type InputType = | 'text' | 'email' | 'select' From 263ab90259de831ed4591d4591c24571dc30c438 Mon Sep 17 00:00:00 2001 From: Openbyte Date: Fri, 16 Feb 2018 16:07:53 +0100 Subject: [PATCH 42/52] Added declarations for 'random-number --- types/random-number/index.d.ts | 29 +++++++++++ types/random-number/random-number-tests.ts | 58 ++++++++++++++++++++++ types/random-number/tsconfig.json | 24 +++++++++ types/random-number/tslint.json | 3 ++ 4 files changed, 114 insertions(+) create mode 100644 types/random-number/index.d.ts create mode 100644 types/random-number/random-number-tests.ts create mode 100644 types/random-number/tsconfig.json create mode 100644 types/random-number/tslint.json diff --git a/types/random-number/index.d.ts b/types/random-number/index.d.ts new file mode 100644 index 0000000000..27399204a5 --- /dev/null +++ b/types/random-number/index.d.ts @@ -0,0 +1,29 @@ +// Type definitions for random-number 0.0 +// Project: https://github.com/ashnur/random-number +// Definitions by: OpenByteDev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// TypeScript Version: 2.2 + +type Generator = (min?: number|null, max?: number|null, integer?: boolean|null) => number; + +interface UnparsedOptions { + min?: number|null; + max?: number|null; + integer?: boolean|null; +} +interface Options { + min: number; + max: number; + integer: boolean; +} + +interface RandomNumber { + (options?: UnparsedOptions): number; + generator(options?: UnparsedOptions): Generator; + defaults(options?: UnparsedOptions): Options; +} + +declare const randomNumber: RandomNumber; + +export = randomNumber; diff --git a/types/random-number/random-number-tests.ts b/types/random-number/random-number-tests.ts new file mode 100644 index 0000000000..72a8fb4628 --- /dev/null +++ b/types/random-number/random-number-tests.ts @@ -0,0 +1,58 @@ +import rn = require('random-number'); + +rn(); + +const options1 = { + min: -1000, + max: 1000, + integer: true +}; +rn(options1); + +const gen1 = rn.generator({ + min: -1000, + max: 1000, + integer: true +}); +gen1(); + +const gen2 = rn.generator({ + min: -1000, + max: 1000, + integer: true +}); +gen2(500); +gen2(500, null, false); + +const options3 = { + min: 9874316514 +}; +rn(options3); + +const options4 = { + max: -9874316514 +}; +rn(options4); + +const options5 = { + integer: true +}; +rn(options5); + +const options6 = { + min: -10, + max: -1 +}; +rn(options6); + +const options7 = { + min: 1000, + integer: true +}; +rn(options7); + +const options8 = { + max: 1000, + integer: true +}; +rn(options8); diff --git a/types/random-number/tsconfig.json b/types/random-number/tsconfig.json new file mode 100644 index 0000000000..96004058a0 --- /dev/null +++ b/types/random-number/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "random-number-tests.ts" + ] +} \ No newline at end of file diff --git a/types/random-number/tslint.json b/types/random-number/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/random-number/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 0b9cb255b954886b0f100e966c2ddb841c91015e Mon Sep 17 00:00:00 2001 From: Tabeth Nkangoh Date: Fri, 16 Feb 2018 10:29:38 -0500 Subject: [PATCH 43/52] Update index.d.ts There appears to be a discrepancy between the description in the comments as well as [the documentation](https://www.emberjs.com/api/ember/3.0/classes/MutableArray/methods/removeAt?anchor=removeAt) and the typing itself. Since we can pass either a single index **or** a start and length, `len` should be an optional parameter (to handle the scenario where you just pass a single index). --- types/ember/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index 4a3d7d45d1..9f08d2fc24 100755 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -1523,7 +1523,7 @@ declare module 'ember' { * Remove an object at the specified index using the `replace()` primitive * method. You can pass either a single index, or a start and a length. */ - removeAt(start: number, len: number): this; + removeAt(start: number, len?: number): this; /** * Push the object onto the end of the array. Works just like `push()` but it * is KVO-compliant. From c52bfaf2157100194a576896892c1e697df2c96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=CC=81rio=20Gonc=CC=A7alves?= Date: Wed, 14 Feb 2018 18:34:29 +0000 Subject: [PATCH 44/52] [jest] updated toHaveProperty method of Matchers --- types/jest/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index e0d73d5c9e..f83c386d09 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -470,7 +470,7 @@ declare namespace jest { * and it is set to a certain numeric value. */ toHaveLength(expected: number): R; - toHaveProperty(propertyPath: string, value?: any): R; + toHaveProperty(propertyPath: string | any[], value?: any): R; /** * Check that a string matches a regular expression. */ From 2a4504a81dd8a256d17dcfba4f899ca692c72805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=CC=81rio=20Gonc=CC=A7alves?= Date: Thu, 15 Feb 2018 12:06:32 +0000 Subject: [PATCH 45/52] Added test cases --- types/jest/jest-tests.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/types/jest/jest-tests.ts b/types/jest/jest-tests.ts index 4d8ae05e1c..4c37f2bb65 100644 --- a/types/jest/jest-tests.ts +++ b/types/jest/jest-tests.ts @@ -642,6 +642,22 @@ describe('rejects', () => { }); }); +// https://facebook.github.io/jest/docs/en/expect.html#tohavepropertykeypath-value +describe('toHaveProperty', () => { + it('it accepts a keyPath as string', () => { + expect({ a: { b: {}}}).toHaveProperty('a'); + }); + it('it accepts a keyPath as string with dot notation', () => { + expect({ a: { b: {}}}).toHaveProperty('a.b'); + }); + it('it accepts a keyPath as an array', () => { + expect({ a: { b: {}}}).toHaveProperty(['a', 'b']); + }); + it('it accepts a keyPath as an array containing non-string values', () => { + expect({ a: ['b']}).toHaveProperty(['a', 0]); + }); +}); + class MyTransformer implements jest.Transformer { process(text: string, path: string) { return ` From e2989586ce935c309ef3e3772d435bc72eaf3ec3 Mon Sep 17 00:00:00 2001 From: Mario Adrian Date: Fri, 16 Feb 2018 18:46:54 +0100 Subject: [PATCH 46/52] Fix dat.gui hyphen --- types/{dat-gui/dat-gui-tests.ts => dat.gui/dat.gui-tests.ts} | 0 types/{dat-gui => dat.gui}/index.d.ts | 0 types/{dat-gui => dat.gui}/tsconfig.json | 2 +- types/{dat-gui => dat.gui}/tslint.json | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename types/{dat-gui/dat-gui-tests.ts => dat.gui/dat.gui-tests.ts} (100%) rename types/{dat-gui => dat.gui}/index.d.ts (100%) rename types/{dat-gui => dat.gui}/tsconfig.json (94%) rename types/{dat-gui => dat.gui}/tslint.json (100%) diff --git a/types/dat-gui/dat-gui-tests.ts b/types/dat.gui/dat.gui-tests.ts similarity index 100% rename from types/dat-gui/dat-gui-tests.ts rename to types/dat.gui/dat.gui-tests.ts diff --git a/types/dat-gui/index.d.ts b/types/dat.gui/index.d.ts similarity index 100% rename from types/dat-gui/index.d.ts rename to types/dat.gui/index.d.ts diff --git a/types/dat-gui/tsconfig.json b/types/dat.gui/tsconfig.json similarity index 94% rename from types/dat-gui/tsconfig.json rename to types/dat.gui/tsconfig.json index 4961272694..3b5d3231ef 100644 --- a/types/dat-gui/tsconfig.json +++ b/types/dat.gui/tsconfig.json @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "dat-gui-tests.ts" + "dat.gui-tests.ts" ] } \ No newline at end of file diff --git a/types/dat-gui/tslint.json b/types/dat.gui/tslint.json similarity index 100% rename from types/dat-gui/tslint.json rename to types/dat.gui/tslint.json From 11ada53c3cf295f10ff30be88ebc66028bb9099a Mon Sep 17 00:00:00 2001 From: nayni Date: Fri, 16 Feb 2018 21:10:23 +0100 Subject: [PATCH 47/52] Add type definitions for graphql-resolve-batch --- .../graphql-resolve-batch-tests.ts | 129 ++++++++++++++++++ types/graphql-resolve-batch/index.d.ts | 26 ++++ types/graphql-resolve-batch/tsconfig.json | 16 +++ types/graphql-resolve-batch/tslint.json | 7 + 4 files changed, 178 insertions(+) create mode 100644 types/graphql-resolve-batch/graphql-resolve-batch-tests.ts create mode 100644 types/graphql-resolve-batch/index.d.ts create mode 100644 types/graphql-resolve-batch/tsconfig.json create mode 100644 types/graphql-resolve-batch/tslint.json diff --git a/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts b/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts new file mode 100644 index 0000000000..1e8a8c3b18 --- /dev/null +++ b/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts @@ -0,0 +1,129 @@ +import { createBatchResolver, ResolverFunction } from "graphql-resolve-batch"; + +// Test cases split up in namespaces to test different type inference scenarios. + +namespace WithSourceAndResult { + interface SomeTestSource { + someSourceProp: string; + } + + interface SomeTestResult { + someTestResultProp: string; + } + + const verify = createBatchResolver( + (sources, _, __) => { + return sources.map(source => { + const res: SomeTestResult = { + someTestResultProp: "" + }; + + return res; + }); + } + ); +} + +namespace WithSourceAndResultAsPromise { + interface SomeTestSource { + someSourceProp: string; + } + + interface SomeTestResult { + someTestResultProp: string; + } + + const verify = createBatchResolver( + (sources, _, __) => { + // $ExpectType ReadonlyArray + const verifySources = sources; + + return sources.map(source => { + return new Promise(resolve => { + const res: SomeTestResult = { + someTestResultProp: "" + }; + + resolve(res); + }); + }); + } + ); +} + +namespace WithSourceAndArgsAndResult { + interface SomeTestSource { + someSourceProp: string; + } + + interface SomeTestArgs { + someArg: string; + } + + interface SomeTestResult { + someTestResultProp: string; + } + + const verify = createBatchResolver< + SomeTestSource, + SomeTestResult, + SomeTestArgs + >((sources, args, _) => { + // $ExpectType ReadonlyArray + const verifySources = sources; + // $ExpectType string + const verifyArgs = args.someArg; + + return sources.map(source => { + return new Promise(resolve => { + const res: SomeTestResult = { + someTestResultProp: "" + }; + + resolve(res); + }); + }); + }); +} + +namespace WithSourceAndArgsAndContextAndResult { + interface SomeTestSource { + someSourceProp: string; + } + + interface SomeTestArgs { + someArg: string; + } + + interface SomeTestContext { + someContextProp: string; + } + + interface SomeTestResult { + someTestResultProp: string; + } + + const verify = createBatchResolver< + SomeTestSource, + SomeTestResult, + SomeTestArgs, + SomeTestContext + >((sources, args, context) => { + // $ExpectType ReadonlyArray + const verifySources = sources; + // $ExpectType string + const verifyArgs = args.someArg; + // $ExpectType string + const verifyContext = context.someContextProp; + + return sources.map(source => { + return new Promise(resolve => { + const res: SomeTestResult = { + someTestResultProp: "" + }; + + resolve(res); + }); + }); + }); +} diff --git a/types/graphql-resolve-batch/index.d.ts b/types/graphql-resolve-batch/index.d.ts new file mode 100644 index 0000000000..3fd9e1242b --- /dev/null +++ b/types/graphql-resolve-batch/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for graphql-resolve-batch 1.0 +// Project: https://github.com/calebmer/graphql-resolve-batch#readme +// Definitions by: Rutger Hendrickx +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +export function createBatchResolver< + TSource, + TReturn, + TArgs = any, + TContext = any +>( + batchResolveFn: BatchResolveFunction +): ResolverFunction; + +export type ResolverFunction = ( + source: TSource, + args: TArgs, + context: TContext +) => Promise; + +export type BatchResolveFunction = ( + sources: ReadonlyArray, + args: TArgs, + context: TContext +) => TReturn[] | Promise[]; diff --git a/types/graphql-resolve-batch/tsconfig.json b/types/graphql-resolve-batch/tsconfig.json new file mode 100644 index 0000000000..aa4ad6661d --- /dev/null +++ b/types/graphql-resolve-batch/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "strictFunctionTypes": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "graphql-resolve-batch-tests.ts"] +} diff --git a/types/graphql-resolve-batch/tslint.json b/types/graphql-resolve-batch/tslint.json new file mode 100644 index 0000000000..fa856c9e87 --- /dev/null +++ b/types/graphql-resolve-batch/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-namespace": false, + "array-type": [true, "array"] + } +} From 973d6bcdefe553e1803d110af2aa9aca0d1094ed Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 16 Feb 2018 15:10:50 -0600 Subject: [PATCH 48/52] [react-beautiful-dnd] update to 4.0.1 --- types/react-beautiful-dnd/index.d.ts | 42 +++++++++++++++---- .../react-beautiful-dnd-tests.tsx | 17 +++----- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/types/react-beautiful-dnd/index.d.ts b/types/react-beautiful-dnd/index.d.ts index b405c481c4..2bf9c7cfc2 100644 --- a/types/react-beautiful-dnd/index.d.ts +++ b/types/react-beautiful-dnd/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-beautiful-dnd 3.0 +// Type definitions for react-beautiful-dnd 4.0.1 // Project: https://github.com/atlassian/react-beautiful-dnd // Definitions by: varHarrie // Bradley Ayers @@ -8,12 +8,10 @@ import * as React from 'react'; export type Id = string; - export type DraggableId = Id; - export type DroppableId = Id; - export type TypeId = Id; +export type ZIndex = number | string; export interface DraggableLocation { droppableId: DroppableId; @@ -71,9 +69,33 @@ export class Droppable extends React.Component {} * Draggable */ -export type DraggableStyle = any; +export interface NotDraggingStyle { + transform: null | string, + transition: null | 'none', +} -export interface DragHandleProps { +export interface DraggingStyle { + pointerEvents: 'none', + position: 'fixed', + width: number, + height: number, + boxSizing: 'border-box', + top: number, + left: number, + margin: 0, + transform: null | string, + transition: 'none', + zIndex: ZIndex, +} + +export interface DraggableProvidedDraggableProps { + // inline style + style: null | DraggingStyle | NotDraggingStyle, + // used for shared global styles + 'data-react-beautiful-dnd-draggable': string, +} + +export interface DraggableProvidedDragHandleProps { onMouseDown: React.MouseEventHandler; onKeyDown: React.KeyboardEventHandler; onClick: React.MouseEventHandler; @@ -85,9 +107,11 @@ export interface DragHandleProps { } export interface DraggableProvided { + draggableProps: DraggableProvidedDraggableProps | null; + dragHandleProps: DraggableProvidedDragHandleProps | null; + + // will be removed after move to react 16 innerRef(element?: HTMLElement | null): any; - draggableStyle?: DraggableStyle | null; - dragHandleProps?: DragHandleProps | null; placeholder?: React.ReactElement | null; } @@ -97,7 +121,7 @@ export interface DraggableStateSnapshot { export interface DraggableProps { draggableId: DroppableId; - type?: TypeId; + index: number; isDragDisabled?: boolean; disableInteractiveElementBlocking?: boolean; children(provided: DraggableProvided, snapshot: DraggableStateSnapshot): React.ReactElement; diff --git a/types/react-beautiful-dnd/react-beautiful-dnd-tests.tsx b/types/react-beautiful-dnd/react-beautiful-dnd-tests.tsx index 8f961e0c7a..b05ff46550 100644 --- a/types/react-beautiful-dnd/react-beautiful-dnd-tests.tsx +++ b/types/react-beautiful-dnd/react-beautiful-dnd-tests.tsx @@ -24,7 +24,7 @@ const reorder = (list: any[], startIndex: number, endIndex: number) => { return result; }; -const getItemStyle = (draggableStyle: any, isDragging: any) => ({ +const getItemStyle = (isDragging: boolean, draggableStyle: any) => ({ userSelect: 'none', background: isDragging ? 'lightgreen' : 'grey', ...draggableStyle @@ -68,21 +68,16 @@ class App extends React.Component<{}, AppState> { {(provided, snapshot) => ( -
- {this.state.items.map(item => ( - +
+ {this.state.items.map((item, index) => ( + {(provided, snapshot) => (
{item.content}
From c18d4deab4b622e354d8afd8066eeb666e13e14b Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 16 Feb 2018 15:13:44 -0600 Subject: [PATCH 49/52] fix not null on DraggableProvided.draggableProps --- types/react-beautiful-dnd/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-beautiful-dnd/index.d.ts b/types/react-beautiful-dnd/index.d.ts index 2bf9c7cfc2..bbacc5980f 100644 --- a/types/react-beautiful-dnd/index.d.ts +++ b/types/react-beautiful-dnd/index.d.ts @@ -107,7 +107,7 @@ export interface DraggableProvidedDragHandleProps { } export interface DraggableProvided { - draggableProps: DraggableProvidedDraggableProps | null; + draggableProps: DraggableProvidedDraggableProps; dragHandleProps: DraggableProvidedDragHandleProps | null; // will be removed after move to react 16 From 5906030ddcea77f818a6cf81f509cd790140e7d5 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 16 Feb 2018 15:20:58 -0600 Subject: [PATCH 50/52] lint --- types/react-beautiful-dnd/index.d.ts | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/types/react-beautiful-dnd/index.d.ts b/types/react-beautiful-dnd/index.d.ts index bbacc5980f..085ad4e8b7 100644 --- a/types/react-beautiful-dnd/index.d.ts +++ b/types/react-beautiful-dnd/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-beautiful-dnd 4.0.1 +// Type definitions for react-beautiful-dnd 4.0 // Project: https://github.com/atlassian/react-beautiful-dnd // Definitions by: varHarrie // Bradley Ayers @@ -70,29 +70,29 @@ export class Droppable extends React.Component {} */ export interface NotDraggingStyle { - transform: null | string, - transition: null | 'none', + transform: null | string; + transition: null | 'none'; } export interface DraggingStyle { - pointerEvents: 'none', - position: 'fixed', - width: number, - height: number, - boxSizing: 'border-box', - top: number, - left: number, - margin: 0, - transform: null | string, - transition: 'none', - zIndex: ZIndex, + pointerEvents: 'none'; + position: 'fixed'; + width: number; + height: number; + boxSizing: 'border-box'; + top: number; + left: number; + margin: 0; + transform: null | string; + transition: 'none'; + zIndex: ZIndex; } export interface DraggableProvidedDraggableProps { // inline style - style: null | DraggingStyle | NotDraggingStyle, + style: null | DraggingStyle | NotDraggingStyle; // used for shared global styles - 'data-react-beautiful-dnd-draggable': string, + 'data-react-beautiful-dnd-draggable': string; } export interface DraggableProvidedDragHandleProps { From de71e260192fc5e142c7f3ffd973c5db277ad753 Mon Sep 17 00:00:00 2001 From: nayni Date: Sat, 17 Feb 2018 00:16:30 +0100 Subject: [PATCH 51/52] graphql-resolve-batch: remove namespace and array-type tslint rule - Restructured the tests to not use namespaces as a result - Promise return becomes an Array because its a complex type --- .../graphql-resolve-batch-tests.ts | 186 +++++++----------- types/graphql-resolve-batch/index.d.ts | 2 +- types/graphql-resolve-batch/tslint.json | 6 +- 3 files changed, 77 insertions(+), 117 deletions(-) diff --git a/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts b/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts index 1e8a8c3b18..1e9a2395a4 100644 --- a/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts +++ b/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts @@ -1,129 +1,93 @@ import { createBatchResolver, ResolverFunction } from "graphql-resolve-batch"; -// Test cases split up in namespaces to test different type inference scenarios. - -namespace WithSourceAndResult { - interface SomeTestSource { - someSourceProp: string; - } - - interface SomeTestResult { - someTestResultProp: string; - } - - const verify = createBatchResolver( - (sources, _, __) => { - return sources.map(source => { - const res: SomeTestResult = { - someTestResultProp: "" - }; - - return res; - }); - } - ); +interface SomeTestSource { + someSourceProp: string; } -namespace WithSourceAndResultAsPromise { - interface SomeTestSource { - someSourceProp: string; - } - - interface SomeTestResult { - someTestResultProp: string; - } - - const verify = createBatchResolver( - (sources, _, __) => { - // $ExpectType ReadonlyArray - const verifySources = sources; - - return sources.map(source => { - return new Promise(resolve => { - const res: SomeTestResult = { - someTestResultProp: "" - }; - - resolve(res); - }); - }); - } - ); +interface SomeTestArgs { + someArg: string; } -namespace WithSourceAndArgsAndResult { - interface SomeTestSource { - someSourceProp: string; - } +interface SomeTestContext { + someContextProp: string; +} - interface SomeTestArgs { - someArg: string; - } +interface SomeTestResult { + someTestResultProp: string; +} - interface SomeTestResult { - someTestResultProp: string; - } +const withSourceAndResultTyped = createBatchResolver< + SomeTestSource, + SomeTestResult +>((sources, _, __) => { + return sources.map(source => { + const res: SomeTestResult = { + someTestResultProp: "" + }; - const verify = createBatchResolver< - SomeTestSource, - SomeTestResult, - SomeTestArgs - >((sources, args, _) => { - // $ExpectType ReadonlyArray - const verifySources = sources; - // $ExpectType string - const verifyArgs = args.someArg; + return res; + }); +}); - return sources.map(source => { - return new Promise(resolve => { - const res: SomeTestResult = { - someTestResultProp: "" - }; +const withSourceAndResultTypedAsPromise = createBatchResolver< + SomeTestSource, + SomeTestResult +>((sources, _, __) => { + // $ExpectType ReadonlyArray + const verifySources = sources; - resolve(res); - }); + return sources.map(source => { + return new Promise(resolve => { + const res: SomeTestResult = { + someTestResultProp: "" + }; + + resolve(res); }); }); -} +}); -namespace WithSourceAndArgsAndContextAndResult { - interface SomeTestSource { - someSourceProp: string; - } +const withSourceAndArgsAndResultTyped = createBatchResolver< + SomeTestSource, + SomeTestResult, + SomeTestArgs +>((sources, args, _) => { + // $ExpectType ReadonlyArray + const verifySources = sources; + // $ExpectType string + const verifyArgs = args.someArg; - interface SomeTestArgs { - someArg: string; - } + return sources.map(source => { + return new Promise(resolve => { + const res: SomeTestResult = { + someTestResultProp: "" + }; - interface SomeTestContext { - someContextProp: string; - } - - interface SomeTestResult { - someTestResultProp: string; - } - - const verify = createBatchResolver< - SomeTestSource, - SomeTestResult, - SomeTestArgs, - SomeTestContext - >((sources, args, context) => { - // $ExpectType ReadonlyArray - const verifySources = sources; - // $ExpectType string - const verifyArgs = args.someArg; - // $ExpectType string - const verifyContext = context.someContextProp; - - return sources.map(source => { - return new Promise(resolve => { - const res: SomeTestResult = { - someTestResultProp: "" - }; - - resolve(res); - }); + resolve(res); }); }); -} +}); + +const withSourceAndArgsAndContextTyped = createBatchResolver< + SomeTestSource, + SomeTestResult, + SomeTestArgs, + SomeTestContext +>((sources, args, context) => { + // $ExpectType ReadonlyArray + const verifySources = sources; + // $ExpectType string + const verifyArgs = args.someArg; + // $ExpectType string + const verifyContext = context.someContextProp; + + return sources.map(source => { + return new Promise(resolve => { + const res: SomeTestResult = { + someTestResultProp: "" + }; + + resolve(res); + }); + }); +}); diff --git a/types/graphql-resolve-batch/index.d.ts b/types/graphql-resolve-batch/index.d.ts index 3fd9e1242b..46f354f7b7 100644 --- a/types/graphql-resolve-batch/index.d.ts +++ b/types/graphql-resolve-batch/index.d.ts @@ -23,4 +23,4 @@ export type BatchResolveFunction = ( sources: ReadonlyArray, args: TArgs, context: TContext -) => TReturn[] | Promise[]; +) => TReturn[] | Array>; diff --git a/types/graphql-resolve-batch/tslint.json b/types/graphql-resolve-batch/tslint.json index fa856c9e87..f93cf8562a 100644 --- a/types/graphql-resolve-batch/tslint.json +++ b/types/graphql-resolve-batch/tslint.json @@ -1,7 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "no-namespace": false, - "array-type": [true, "array"] - } + "extends": "dtslint/dt.json" } From 54c1e85b542ae833289a7b395744c8e3504bedaa Mon Sep 17 00:00:00 2001 From: Openbyte Date: Sat, 17 Feb 2018 07:35:12 +0100 Subject: [PATCH 52/52] removed null types from UnparsedOptions --- types/random-number/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/random-number/index.d.ts b/types/random-number/index.d.ts index 27399204a5..2a7d25ee14 100644 --- a/types/random-number/index.d.ts +++ b/types/random-number/index.d.ts @@ -8,9 +8,9 @@ type Generator = (min?: number|null, max?: number|null, integer?: boolean|null) => number; interface UnparsedOptions { - min?: number|null; - max?: number|null; - integer?: boolean|null; + min?: number; + max?: number; + integer?: boolean; } interface Options { min: number;