microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.13.1

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/typings/exponent/xdl.d.ts

117lines · 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 module 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): Q.Promise<IUser>;
18 logoutAsync(): Q.Promise<void>;
19 getCurrentUserAsync(): Q.Promise<IUser>;
20 }
21
22 var UserManager: {
23 loginAsync(loginType: string, options: ILoginOptions): Q.Promise<IUser>;
24 logoutAsync(): Q.Promise<void>;
25 getCurrentUserAsync(): Q.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 var Project: {
57 startAsync(projectRoot: string, options?: IStartOptions): Q.Promise<void>;
58 stopAsync(projectRoot: string): Q.Promise<void>;
59 getUrlAsync(projectRoot: string, options?: IUrlOptions): Q.Promise<string>;
60 publishAsync(projectRoot: string, options?: IPublishOptions): Q.Promise<IPublishResponse>;
61 startExpoServerAsync(projectRoot: string): Q.Promise<void>;
62 stopExpoServerAsync(projectRoot: string): Q.Promise<void>;
63 startReactNativeServerAsync(projectRoot: string, options?: IReactNativeServerOptions): Q.Promise<void>;
64 stopReactNativeServerAsync(projectRoot: string): Q.Promise<void>;
65 startTunnelsAsync(projectRoot: string): Q.Promise<void>;
66 stopTunnelsAsync(projectRoot: string): Q.Promise<void>;
67 setOptionsAsync(projectRoot: string, options?: IOptions): Q.Promise<void>;
68 }
69
70 var Versions: {
71 facebookReactNativeVersionsAsync(): Q.Promise<string[]>;
72 facebookReactNativeVersionToExpoVersionAsync(facebookReactNativeVersion: string): Q.Promise<string>;
73 }
74
75 interface IApiConfig {
76 scheme: string,
77 host: string,
78 port: number
79 }
80
81 interface INgrokConfig {
82 authToken: string,
83 authTokenPublicId: string,
84 domain: string
85 }
86
87 interface IValidationConfig {
88 reactNativeVersionWarnings: boolean
89 }
90
91 interface IConfig {
92 api: IApiConfig,
93 ngrok: INgrokConfig,
94 developerTool: any,
95 validation: IValidationConfig
96 }
97
98 var Config: IConfig;
99
100 interface IBunyanStream {
101 type?: string;
102 level?: number | string;
103 path?: string;
104 stream?: NodeJS.WritableStream | IBunyanStream;
105 closeOnExit?: boolean;
106 period?: string;
107 count?: number;
108 }
109
110 var ProjectUtils: {
111 attachLoggerStream(rootPath: string, options?: IBunyanStream): void;
112 }
113}
114
115declare module "xdl" {
116 export = xdl;
117}