Add new Expo type definitions from official docs

This commit is contained in:
Pavel
2018-11-27 22:41:31 +01:00
parent 3c077a8da8
commit 6edec833a2
2 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -145,7 +145,8 @@ Audio.setAudioModeAsync({
playsInSilentModeIOS: true,
interruptionModeIOS: 2,
interruptionModeAndroid: 1,
allowsRecordingIOS: true
allowsRecordingIOS: true,
playThroughEarpieceAndroid: false
});
Audio.setIsEnabledAsync(true);
+7 -3
View File
@@ -12,6 +12,7 @@
// Nathan Phillip Brink <https://github.com/binki>
// Martin Olsson <https://github.com/mo>
// Levan Basharuli <https://github.com/levansuper>
// Pavel Ihm <https://github.com/ihmpavel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -405,6 +406,9 @@ export namespace Audio {
/** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */
interruptionModeAndroid: InterruptionModeAndroid;
/** Boolean selecting if audio should go to earpiece (only on Android).*/
playThroughEarpieceAndroid: boolean;
}
function setIsEnabledAsync(value: boolean): Promise<void>;
@@ -566,7 +570,7 @@ export interface PlaybackStatusToSet {
volume?: number;
}
export type PlaybackSource = RequireSource | { uri: string } | Asset;
export type PlaybackSource = RequireSource | { uri: string, headers?: { [string]: string }, overrideFileExtensionAndroid?: string } | Asset;
export class PlaybackObject {
/**
@@ -2355,7 +2359,7 @@ export namespace Calendar {
/** Name for the account that owns this calendar */
ownerAccount?: string; // Android
/** Time zone for the calendar */
/** Time zone for the calendar */
timeZone?: string; // Android
/** Alarm methods that this calendar supports */
@@ -2398,7 +2402,7 @@ export namespace Calendar {
/** Visible name of the event */
title?: string;
/** Location field of the event */
/** Location field of the event */
location?: string;
/** Date when the event record was created */