microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
dev/v-peq/upgrade_tsTarget

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/typings/exponent/xdl.d.ts

171lines · modecode

1// Type definitions for xdl 0.9.0
2// Project: https://github.com/exponentjs/xdl
3// Definitions by: Patricio Beltran <https://github.com/patobeltran>
4
5declare namespace xdl {
6 interface ILoginOptions {
7 username: string;
8 password: string;
9 }
10
11 interface IUser {
12 type: string;
13 username: string;
14 }
15
16 var User: {
17 loginAsync(loginType: string, options: ILoginOptions): Promise<IUser>;
18 logoutAsync(): Promise<void>;
19 getCurrentUserAsync(): Promise<IUser>;
20 };
21
22 var UserManager: {
23 loginAsync(loginType: string, options: ILoginOptions): Promise<IUser>;
24 logoutAsync(): Promise<void>;
25 getCurrentUserAsync(): Promise<IUser>;
26 };
27
28 interface IStartOptions {
29 reset?: boolean;
30 }
31
32 interface IUrlOptions {
33 urlType?: "exp" | "http" | "redirect";
34 hostType?: "tunnel" | "lan" | "localhost";
35 dev: boolean;
36 minify: boolean;
37 }
38
39 interface IPublishOptions {
40 quiet: boolean;
41 }
42
43 interface IReactNativeServerOptions {
44 reset: boolean;
45 }
46
47 interface IOptions {
48 packagerPort: number;
49 }
50
51 interface IPublishResponse {
52 err: any;
53 url: string;
54 }
55
56 interface SDKVersion {
57 androidExpoViewUrl?: string;
58 expoReactNativeTag: string;
59 /* deprecated */ exponentReactNativeTag?: string;
60 expokitNpmPackage?: string;
61 facebookReactNativeVersion: string;
62 facebookReactVersion?: string;
63 iosExpoViewUrl?: string;
64 /* deprecated */ iosExponentViewUrl?: string;
65 iosVersion?: string;
66 isDeprecated?: boolean;
67 packagesToInstallWhenEjecting?: { [name: string]: string };
68 releaseNoteUrl?: string;
69 iosClientUrl?: string;
70 iosClientVersion?: string;
71 androidClientUrl?: string;
72 androidClientVersion?: string;
73 relatedPackages?: { [name: string]: string };
74 beta?: boolean;
75 }
76
77 interface SDKVersions {
78 [version: string]: SDKVersion;
79 }
80
81 var Project: {
82 startAsync(projectRoot: string, options?: IStartOptions): Promise<void>;
83 stopAsync(projectRoot: string): Promise<void>;
84 getUrlAsync(projectRoot: string, options?: IUrlOptions): Promise<string>;
85 publishAsync(projectRoot: string, options?: IPublishOptions): Promise<IPublishResponse>;
86 startExpoServerAsync(projectRoot: string): Promise<void>;
87 stopExpoServerAsync(projectRoot: string): Promise<void>;
88 startReactNativeServerAsync(
89 projectRoot: string,
90 options?: IReactNativeServerOptions,
91 ): Promise<void>;
92 stopReactNativeServerAsync(projectRoot: string): Promise<void>;
93 startTunnelsAsync(projectRoot: string): Promise<void>;
94 stopTunnelsAsync(projectRoot: string): Promise<void>;
95 };
96
97 var ProjectSettings: {
98 setPackagerInfoAsync(projectRoot: string, json: Partial<IOptions>): Promise<IOptions>;
99 };
100
101 var UrlUtils: {
102 constructManifestUrlAsync(
103 projectRoot: string,
104 opts?: any,
105 requestHostname?: string,
106 ): Promise<string>;
107 };
108
109 var Versions: {
110 sdkVersionsAsync(): Promise<SDKVersions>;
111 releasedSdkVersionsAsync(): Promise<SDKVersions>;
112 };
113
114 var Android: {
115 startAdbReverseAsync(projectRoot: string): Promise<boolean>;
116 stopAdbReverseAsync(projectRoot: string): Promise<void>;
117 };
118
119 interface IApiConfig {
120 scheme: string;
121 host: string;
122 port: number;
123 }
124
125 interface INgrokConfig {
126 authToken: string;
127 authTokenPublicId: string;
128 domain: string;
129 }
130
131 interface IValidationConfig {
132 reactNativeVersionWarnings: boolean;
133 }
134
135 interface IConfig {
136 api: IApiConfig;
137 ngrok: INgrokConfig;
138 developerTool: any;
139 validation: IValidationConfig;
140 }
141
142 var Config: IConfig;
143
144 interface IBunyanStream {
145 type?: string;
146 level?: number | string;
147 path?: string;
148 stream?: NodeJS.WritableStream | IBunyanStream;
149 closeOnExit?: boolean;
150 period?: string;
151 count?: number;
152 }
153
154 var ProjectUtils: {
155 attachLoggerStream(rootPath: string, options?: IBunyanStream): void;
156 };
157
158 interface ResolveNgrok {
159 resolveNgrokAsync(
160 projectRoot: string,
161 {
162 shouldPrompt = true,
163 autoInstall = false,
164 }: { shouldPrompt?: boolean; autoInstall?: boolean } = {},
165 ): Promise<any>;
166 }
167}
168
169declare module "xdl" {
170 export = xdl;
171}
172