microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
align-android-launch-command

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/typings/exponent/xdl.d.ts

171lines · modeblame

1c32fe84Patricio Beltran9 years ago1// Type definitions for xdl 0.9.0
2// Project: https://github.com/exponentjs/xdl
3// Definitions by: Patricio Beltran <https://github.com/patobeltran>
4
176f99c8ConnorQi013 months ago5declare namespace xdl {
1c32fe84Patricio Beltran9 years ago6interface ILoginOptions {
176f99c8ConnorQi013 months ago7username: string;
8password: string;
1c32fe84Patricio Beltran9 years ago9}
10
11interface IUser {
176f99c8ConnorQi013 months ago12type: string;
13username: string;
1c32fe84Patricio Beltran9 years ago14}
15
16var User: {
ce5e88eeYuri Skorokhodov5 years ago17loginAsync(loginType: string, options: ILoginOptions): Promise<IUser>;
18logoutAsync(): Promise<void>;
19getCurrentUserAsync(): Promise<IUser>;
176f99c8ConnorQi013 months ago20};
1c32fe84Patricio Beltran9 years ago21
4aec730eYuri Skorokhodov6 years ago22var UserManager: {
ce5e88eeYuri Skorokhodov5 years ago23loginAsync(loginType: string, options: ILoginOptions): Promise<IUser>;
24logoutAsync(): Promise<void>;
25getCurrentUserAsync(): Promise<IUser>;
176f99c8ConnorQi013 months ago26};
4aec730eYuri Skorokhodov6 years ago27
1c32fe84Patricio Beltran9 years ago28interface IStartOptions {
176f99c8ConnorQi013 months ago29reset?: boolean;
1c32fe84Patricio Beltran9 years ago30}
31
32interface IUrlOptions {
176f99c8ConnorQi013 months ago33urlType?: "exp" | "http" | "redirect";
34hostType?: "tunnel" | "lan" | "localhost";
35dev: boolean;
36minify: boolean;
1c32fe84Patricio Beltran9 years ago37}
38
39interface IPublishOptions {
176f99c8ConnorQi013 months ago40quiet: boolean;
1c32fe84Patricio Beltran9 years ago41}
42
43interface IReactNativeServerOptions {
176f99c8ConnorQi013 months ago44reset: boolean;
1c32fe84Patricio Beltran9 years ago45}
46
47interface IOptions {
176f99c8ConnorQi013 months ago48packagerPort: number;
1c32fe84Patricio Beltran9 years ago49}
50
51interface IPublishResponse {
176f99c8ConnorQi013 months ago52err: any;
53url: string;
1c32fe84Patricio Beltran9 years ago54}
55
8f50947fRedMickey5 years ago56interface SDKVersion {
57androidExpoViewUrl?: string;
58expoReactNativeTag: string;
59/* deprecated */ exponentReactNativeTag?: string;
60expokitNpmPackage?: string;
61facebookReactNativeVersion: string;
62facebookReactVersion?: string;
63iosExpoViewUrl?: string;
64/* deprecated */ iosExponentViewUrl?: string;
65iosVersion?: string;
66isDeprecated?: boolean;
67packagesToInstallWhenEjecting?: { [name: string]: string };
68releaseNoteUrl?: string;
69iosClientUrl?: string;
70iosClientVersion?: string;
71androidClientUrl?: string;
72androidClientVersion?: string;
73relatedPackages?: { [name: string]: string };
74beta?: boolean;
75}
76
77interface SDKVersions {
78[version: string]: SDKVersion;
79}
80
1c32fe84Patricio Beltran9 years ago81var Project: {
ce5e88eeYuri Skorokhodov5 years ago82startAsync(projectRoot: string, options?: IStartOptions): Promise<void>;
83stopAsync(projectRoot: string): Promise<void>;
84getUrlAsync(projectRoot: string, options?: IUrlOptions): Promise<string>;
85publishAsync(projectRoot: string, options?: IPublishOptions): Promise<IPublishResponse>;
86startExpoServerAsync(projectRoot: string): Promise<void>;
87stopExpoServerAsync(projectRoot: string): Promise<void>;
176f99c8ConnorQi013 months ago88startReactNativeServerAsync(
89projectRoot: string,
90options?: IReactNativeServerOptions,
91): Promise<void>;
ce5e88eeYuri Skorokhodov5 years ago92stopReactNativeServerAsync(projectRoot: string): Promise<void>;
93startTunnelsAsync(projectRoot: string): Promise<void>;
94stopTunnelsAsync(projectRoot: string): Promise<void>;
176f99c8ConnorQi013 months ago95};
ec230406RedMickey4 years ago96
97var ProjectSettings: {
98setPackagerInfoAsync(projectRoot: string, json: Partial<IOptions>): Promise<IOptions>;
176f99c8ConnorQi013 months ago99};
1c32fe84Patricio Beltran9 years ago100
a81a5847JiglioNero5 years ago101var UrlUtils: {
176f99c8ConnorQi013 months ago102constructManifestUrlAsync(
103projectRoot: string,
104opts?: any,
105requestHostname?: string,
106): Promise<string>;
107};
a81a5847JiglioNero5 years ago108
1c32fe84Patricio Beltran9 years ago109var Versions: {
8f50947fRedMickey5 years ago110sdkVersionsAsync(): Promise<SDKVersions>;
111releasedSdkVersionsAsync(): Promise<SDKVersions>;
176f99c8ConnorQi013 months ago112};
1c32fe84Patricio Beltran9 years ago113
62c4de22RedMickey6 years ago114var Android: {
ce5e88eeYuri Skorokhodov5 years ago115startAdbReverseAsync(projectRoot: string): Promise<boolean>;
116stopAdbReverseAsync(projectRoot: string): Promise<void>;
176f99c8ConnorQi013 months ago117};
62c4de22RedMickey6 years ago118
1c32fe84Patricio Beltran9 years ago119interface IApiConfig {
176f99c8ConnorQi013 months ago120scheme: string;
121host: string;
122port: number;
1c32fe84Patricio Beltran9 years ago123}
124
125interface INgrokConfig {
176f99c8ConnorQi013 months ago126authToken: string;
127authTokenPublicId: string;
128domain: string;
1c32fe84Patricio Beltran9 years ago129}
130
131interface IValidationConfig {
176f99c8ConnorQi013 months ago132reactNativeVersionWarnings: boolean;
1c32fe84Patricio Beltran9 years ago133}
134
135interface IConfig {
176f99c8ConnorQi013 months ago136api: IApiConfig;
137ngrok: INgrokConfig;
138developerTool: any;
139validation: IValidationConfig;
1c32fe84Patricio Beltran9 years ago140}
141
142var Config: IConfig;
7059d307Patricio Beltran9 years ago143
144interface IBunyanStream {
145type?: string;
146level?: number | string;
147path?: string;
148stream?: NodeJS.WritableStream | IBunyanStream;
149closeOnExit?: boolean;
150period?: string;
151count?: number;
152}
153
154var ProjectUtils: {
155attachLoggerStream(rootPath: string, options?: IBunyanStream): void;
176f99c8ConnorQi013 months ago156};
efb436fcRedMickey5 years ago157
176f99c8ConnorQi013 months ago158interface ResolveNgrok {
efb436fcRedMickey5 years ago159resolveNgrokAsync(
160projectRoot: string,
161{
162shouldPrompt = true,
163autoInstall = false,
164}: { shouldPrompt?: boolean; autoInstall?: boolean } = {},
165): Promise<any>;
176f99c8ConnorQi013 months ago166}
1c32fe84Patricio Beltran9 years ago167}
168
169declare module "xdl" {
170export = xdl;
176f99c8ConnorQi013 months ago171}