@nativescript/compiler-angular 0.0.0-stage → 9.2.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular-libraries.js +173 -0
- package/dist/angular.js +2895 -0
- package/dist/component-bases.js +746 -0
- package/dist/core-api.js +8 -0
- package/dist/entry.js +118 -0
- package/dist/index.js +157 -0
- package/dist/kotlin.js +280 -0
- package/dist/modules.js +698 -0
- package/dist/ng-modules.js +66 -0
- package/dist/package.js +15 -0
- package/dist/refusals.js +5 -0
- package/dist/semantics.js +213 -0
- package/dist/swift.js +340 -0
- package/kit-android/fromcore/AngularAPI.kt +172 -0
- package/kit-android/fromcore/AngularRouter.kt +587 -0
- package/kit-android/handport/Router.kt +151 -0
- package/kit-android/main/AngularChangeDetection.kt +250 -0
- package/kit-android/main/AngularCore.kt +685 -0
- package/kit-android/main/AngularHttp.kt +431 -0
- package/kit-android/main/AngularRouterValues.kt +154 -0
- package/kit-android/main/AngularRx.kt +224 -0
- package/kit-apple/AngularAPI.swift +224 -0
- package/kit-apple/AngularChangeDetection.swift +248 -0
- package/kit-apple/AngularCore.swift +764 -0
- package/kit-apple/AngularHttp.swift +467 -0
- package/kit-apple/AngularRouter.swift +626 -0
- package/kit-apple/AngularRouterValues.swift +285 -0
- package/kit-apple/AngularRx.swift +246 -0
- package/kit-apple/kit-index.json +739 -0
- package/package.json +53 -4
- package/runtime/angular-forms.ts +3099 -0
- package/runtime/angular-rx.ts +550 -0
- package/runtime/angular.ts +826 -0
- package/README.md +0 -3
package/dist/modules.js
ADDED
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
// Angular's packages as a compiled app's program reads them: the declarations of what the translators recognise and the
|
|
2
|
+
// kit implements, and the ports of @angular/forms and the Rx-based APIs this adapter ships as TypeScript.
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { core } from "./core-api.js";
|
|
5
|
+
import { RUNTIME } from "./package.js";
|
|
6
|
+
/** The Angular APIs over the kit's Observable and router, compiled with an app that compiles packages from their source. */
|
|
7
|
+
const RX_FILE = join(RUNTIME, 'angular-rx.ts');
|
|
8
|
+
/** @angular/forms, ported: compiled as a package's source is, its classes' type parameters erased. */
|
|
9
|
+
const FORMS_FILE = join(RUNTIME, 'angular-forms.ts');
|
|
10
|
+
const SHIMS = {
|
|
11
|
+
/** The kit's Angular API: its Rx, router, HTTP and DI types, which the Angular shims and the runtime ports build on. */
|
|
12
|
+
'@angular#kit': `
|
|
13
|
+
import type { Observable } from 'rxjs';
|
|
14
|
+
/** Angular's async pipe at one binding site. */
|
|
15
|
+
export declare class AsyncPipe { transform<T>(observable: Observable<T> | null | undefined): T | null }
|
|
16
|
+
export declare class TeardownHandle { readonly closed: boolean; unsubscribe(): void }
|
|
17
|
+
export declare class RxObservable<T> {
|
|
18
|
+
subscribe(next: (value: T) => void, error?: (err: any) => void, complete?: () => void): TeardownHandle;
|
|
19
|
+
mapValues<R>(transform: (value: T) => R): RxObservable<R>;
|
|
20
|
+
}
|
|
21
|
+
export declare class RxSubject<T> extends RxObservable<T> { next(value: T): void; asObservable(): RxObservable<T> }
|
|
22
|
+
export declare class RxBehaviorSubject<T> extends RxSubject<T> { readonly value: T; getValue(): T }
|
|
23
|
+
export declare class NavigationStart { readonly id: number; readonly url: string; readonly navigationTrigger?: string; readonly restoredState?: any; constructor(id: number, url: string) }
|
|
24
|
+
export declare class NavigationEnd { readonly id: number; readonly url: string; readonly urlAfterRedirects: string; constructor(id: number, url: string, urlAfterRedirects?: string) }
|
|
25
|
+
export declare class NavigationCancel { readonly id: number; readonly url: string; readonly reason: string; constructor(id: number, url: string, reason?: string) }
|
|
26
|
+
export declare class NavigationError { readonly id: number; readonly url: string; readonly error: any; constructor(id: number, url: string, error?: any) }
|
|
27
|
+
export declare class RoutesRecognized { readonly id: number; readonly url: string; readonly urlAfterRedirects: string; readonly state: any; constructor(id: number, url: string, urlAfterRedirects?: string, state?: any) }
|
|
28
|
+
export declare class ResolveStart { readonly id: number; readonly url: string; readonly urlAfterRedirects: string; readonly state: any; constructor(id: number, url: string, urlAfterRedirects?: string, state?: any) }
|
|
29
|
+
export declare class ResolveEnd { readonly id: number; readonly url: string; readonly urlAfterRedirects: string; readonly state: any; constructor(id: number, url: string, urlAfterRedirects?: string, state?: any) }
|
|
30
|
+
export declare class ParamMap { constructor(params?: any); has(name: string): boolean; get(name: string): string | null; getAll(name: string): string[]; readonly keys: string[] }
|
|
31
|
+
export declare function convertToParamMap(params: Record<string, any>): ParamMap;
|
|
32
|
+
export declare class UrlSegment { readonly path: string; readonly parameters: Record<string, string>; readonly parameterMap: ParamMap; constructor(path: string, parameters?: Record<string, string>); toString(): string }
|
|
33
|
+
export declare class UrlTree { queryParams: Record<string, any>; fragment: string | null; readonly queryParamMap: ParamMap; constructor(path?: string, queryParams?: Record<string, any>, fragment?: string | null); toString(): string }
|
|
34
|
+
export declare class DefaultUrlSerializer { parse(url: string): UrlTree; serialize(tree: UrlTree): string }
|
|
35
|
+
export declare class ActivatedRouteSnapshot {
|
|
36
|
+
readonly params: Record<string, string>;
|
|
37
|
+
readonly queryParams: Record<string, string>;
|
|
38
|
+
readonly data: Record<string, any>;
|
|
39
|
+
readonly url: UrlSegment[];
|
|
40
|
+
readonly fragment: string | null;
|
|
41
|
+
readonly outlet: string;
|
|
42
|
+
readonly routeConfig: any;
|
|
43
|
+
title?: string;
|
|
44
|
+
readonly paramMap: ParamMap;
|
|
45
|
+
readonly queryParamMap: ParamMap;
|
|
46
|
+
readonly root: ActivatedRouteSnapshot;
|
|
47
|
+
readonly parent: ActivatedRouteSnapshot | null;
|
|
48
|
+
readonly firstChild: ActivatedRouteSnapshot | null;
|
|
49
|
+
readonly children: ActivatedRouteSnapshot[];
|
|
50
|
+
readonly pathFromRoot: ActivatedRouteSnapshot[];
|
|
51
|
+
}
|
|
52
|
+
export declare function createRouterStateSnapshot(url?: string): any;
|
|
53
|
+
export declare class RouterStateSnapshot { readonly url: string; readonly root: ActivatedRouteSnapshot; toString(): string }
|
|
54
|
+
export declare class HttpHeaders {
|
|
55
|
+
constructor(headers?: string | Record<string, string | number | (string | number)[]>);
|
|
56
|
+
has(name: string): boolean;
|
|
57
|
+
get(name: string): string | null;
|
|
58
|
+
keys(): string[];
|
|
59
|
+
getAll(name: string): string[] | null;
|
|
60
|
+
append(name: string, value: string | string[]): HttpHeaders;
|
|
61
|
+
set(name: string, value: string | string[]): HttpHeaders;
|
|
62
|
+
delete(name: string, value?: string | string[]): HttpHeaders;
|
|
63
|
+
}
|
|
64
|
+
export declare class HttpParams {
|
|
65
|
+
constructor(options?: { fromString?: string; fromObject?: Record<string, any> } | Record<string, any>);
|
|
66
|
+
has(param: string): boolean;
|
|
67
|
+
get(param: string): string | null;
|
|
68
|
+
getAll(param: string): string[] | null;
|
|
69
|
+
keys(): string[];
|
|
70
|
+
append(param: string, value: string | number | boolean): HttpParams;
|
|
71
|
+
appendAll(params: Record<string, any>): HttpParams;
|
|
72
|
+
set(param: string, value: string | number | boolean): HttpParams;
|
|
73
|
+
delete(param: string, value?: string | number | boolean): HttpParams;
|
|
74
|
+
toString(): string;
|
|
75
|
+
}
|
|
76
|
+
export declare class HttpContextToken<T = any> { readonly defaultValue: () => any; constructor(defaultValue: () => T) }
|
|
77
|
+
export declare class HttpContext {
|
|
78
|
+
set<T>(token: HttpContextToken<T>, value: T): HttpContext;
|
|
79
|
+
get(token: HttpContextToken<any>): any;
|
|
80
|
+
delete(token: HttpContextToken<any>): HttpContext;
|
|
81
|
+
has(token: HttpContextToken<any>): boolean;
|
|
82
|
+
}
|
|
83
|
+
export declare class HttpResponse<T = any> {
|
|
84
|
+
readonly body: any;
|
|
85
|
+
readonly headers: HttpHeaders;
|
|
86
|
+
readonly status: number;
|
|
87
|
+
readonly statusText: string;
|
|
88
|
+
readonly url: string | null;
|
|
89
|
+
readonly ok: boolean;
|
|
90
|
+
readonly type: number;
|
|
91
|
+
constructor(init?: { body?: T | null; headers?: HttpHeaders; status?: number; statusText?: string; url?: string });
|
|
92
|
+
clone(update?: any): HttpResponse<any>;
|
|
93
|
+
}
|
|
94
|
+
export declare class HttpErrorResponse extends Error {
|
|
95
|
+
readonly error: any;
|
|
96
|
+
readonly headers: HttpHeaders;
|
|
97
|
+
readonly status: number;
|
|
98
|
+
readonly statusText: string;
|
|
99
|
+
readonly url: string | null;
|
|
100
|
+
readonly ok: boolean;
|
|
101
|
+
constructor(init?: { error?: any; headers?: HttpHeaders; status?: number; statusText?: string; url?: string });
|
|
102
|
+
}
|
|
103
|
+
export declare class HttpRequest<T = any> {
|
|
104
|
+
readonly method: string;
|
|
105
|
+
readonly url: string;
|
|
106
|
+
readonly body: any;
|
|
107
|
+
readonly headers: HttpHeaders;
|
|
108
|
+
readonly params: HttpParams;
|
|
109
|
+
readonly context: HttpContext;
|
|
110
|
+
readonly responseType: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
111
|
+
readonly withCredentials: boolean;
|
|
112
|
+
readonly reportProgress: boolean;
|
|
113
|
+
readonly urlWithParams: string;
|
|
114
|
+
constructor(method: string, url: string, third?: any, fourth?: any);
|
|
115
|
+
clone(update?: any): HttpRequest<any>;
|
|
116
|
+
}
|
|
117
|
+
export declare const HTTP_INTERCEPTORS: import('@angular/core').InjectionToken<any[]>;
|
|
118
|
+
export declare enum HttpStatusCode {
|
|
119
|
+
Continue = 100,
|
|
120
|
+
SwitchingProtocols = 101,
|
|
121
|
+
Processing = 102,
|
|
122
|
+
EarlyHints = 103,
|
|
123
|
+
Ok = 200,
|
|
124
|
+
Created = 201,
|
|
125
|
+
Accepted = 202,
|
|
126
|
+
NonAuthoritativeInformation = 203,
|
|
127
|
+
NoContent = 204,
|
|
128
|
+
ResetContent = 205,
|
|
129
|
+
PartialContent = 206,
|
|
130
|
+
MultiStatus = 207,
|
|
131
|
+
AlreadyReported = 208,
|
|
132
|
+
ImUsed = 226,
|
|
133
|
+
MultipleChoices = 300,
|
|
134
|
+
MovedPermanently = 301,
|
|
135
|
+
Found = 302,
|
|
136
|
+
SeeOther = 303,
|
|
137
|
+
NotModified = 304,
|
|
138
|
+
UseProxy = 305,
|
|
139
|
+
Unused = 306,
|
|
140
|
+
TemporaryRedirect = 307,
|
|
141
|
+
PermanentRedirect = 308,
|
|
142
|
+
BadRequest = 400,
|
|
143
|
+
Unauthorized = 401,
|
|
144
|
+
PaymentRequired = 402,
|
|
145
|
+
Forbidden = 403,
|
|
146
|
+
NotFound = 404,
|
|
147
|
+
MethodNotAllowed = 405,
|
|
148
|
+
NotAcceptable = 406,
|
|
149
|
+
ProxyAuthenticationRequired = 407,
|
|
150
|
+
RequestTimeout = 408,
|
|
151
|
+
Conflict = 409,
|
|
152
|
+
Gone = 410,
|
|
153
|
+
LengthRequired = 411,
|
|
154
|
+
PreconditionFailed = 412,
|
|
155
|
+
PayloadTooLarge = 413,
|
|
156
|
+
UriTooLong = 414,
|
|
157
|
+
UnsupportedMediaType = 415,
|
|
158
|
+
RangeNotSatisfiable = 416,
|
|
159
|
+
ExpectationFailed = 417,
|
|
160
|
+
ImATeapot = 418,
|
|
161
|
+
MisdirectedRequest = 421,
|
|
162
|
+
UnprocessableEntity = 422,
|
|
163
|
+
Locked = 423,
|
|
164
|
+
FailedDependency = 424,
|
|
165
|
+
TooEarly = 425,
|
|
166
|
+
UpgradeRequired = 426,
|
|
167
|
+
PreconditionRequired = 428,
|
|
168
|
+
TooManyRequests = 429,
|
|
169
|
+
RequestHeaderFieldsTooLarge = 431,
|
|
170
|
+
UnavailableForLegalReasons = 451,
|
|
171
|
+
InternalServerError = 500,
|
|
172
|
+
NotImplemented = 501,
|
|
173
|
+
BadGateway = 502,
|
|
174
|
+
ServiceUnavailable = 503,
|
|
175
|
+
GatewayTimeout = 504,
|
|
176
|
+
HttpVersionNotSupported = 505,
|
|
177
|
+
VariantAlsoNegotiates = 506,
|
|
178
|
+
InsufficientStorage = 507,
|
|
179
|
+
LoopDetected = 508,
|
|
180
|
+
NotExtended = 510,
|
|
181
|
+
NetworkAuthenticationRequired = 511,
|
|
182
|
+
}
|
|
183
|
+
export declare function withInterceptors(fns: any[]): any;
|
|
184
|
+
export declare function withInterceptorsFromDi(): any;
|
|
185
|
+
export declare function withFetch(): any;
|
|
186
|
+
export declare function provideHttpClient(...features: any[]): any;
|
|
187
|
+
export declare function provideNativeScriptHttpClient(...features: any[]): any;
|
|
188
|
+
export declare function provideNativeScriptNgZone(options?: any): any;
|
|
189
|
+
export declare function provideRouter(routes?: any, ...features: any[]): any;
|
|
190
|
+
export declare function provideNativeScriptRouter(routes?: any, ...features: any[]): any;
|
|
191
|
+
export declare class HttpClientModule { static forRoot(): any }
|
|
192
|
+
export declare function bootstrapApplication(component: any, options?: any): Promise<any>;
|
|
193
|
+
export declare function runNativeScriptAngularApp(options: any): void;
|
|
194
|
+
export declare class KitHttpClient {
|
|
195
|
+
static readonly shared: KitHttpClient;
|
|
196
|
+
request(first: any, url?: string, options?: any): RxObservable<any>;
|
|
197
|
+
get(url: string, options?: any): RxObservable<any>;
|
|
198
|
+
delete(url: string, options?: any): RxObservable<any>;
|
|
199
|
+
head(url: string, options?: any): RxObservable<any>;
|
|
200
|
+
options(url: string, options?: any): RxObservable<any>;
|
|
201
|
+
post(url: string, body?: any, options?: any): RxObservable<any>;
|
|
202
|
+
put(url: string, body?: any, options?: any): RxObservable<any>;
|
|
203
|
+
patch(url: string, body?: any, options?: any): RxObservable<any>;
|
|
204
|
+
jsonp(url: string, callbackParam: string): RxObservable<any>;
|
|
205
|
+
}
|
|
206
|
+
export declare class KitActivatedRoute {
|
|
207
|
+
static current: KitActivatedRoute;
|
|
208
|
+
readonly snapshot: ActivatedRouteSnapshot;
|
|
209
|
+
readonly params: RxBehaviorSubject<Record<string, string>>;
|
|
210
|
+
readonly queryParams: RxBehaviorSubject<Record<string, string>>;
|
|
211
|
+
readonly data: RxBehaviorSubject<Record<string, any>>;
|
|
212
|
+
readonly paramMap: RxBehaviorSubject<ParamMap>;
|
|
213
|
+
readonly queryParamMap: RxBehaviorSubject<ParamMap>;
|
|
214
|
+
readonly fragment: RxBehaviorSubject<string | null>;
|
|
215
|
+
readonly title: RxBehaviorSubject<string | undefined>;
|
|
216
|
+
readonly outlet: string;
|
|
217
|
+
readonly routeConfig: any;
|
|
218
|
+
}
|
|
219
|
+
export declare class KitRouter {
|
|
220
|
+
static readonly shared: KitRouter;
|
|
221
|
+
readonly url: string;
|
|
222
|
+
readonly routerState: any;
|
|
223
|
+
readonly events: RxSubject<NavigationEnd>;
|
|
224
|
+
createUrlTree(commands: any[], extras?: any): UrlTree;
|
|
225
|
+
serializeUrl(url: any): string;
|
|
226
|
+
parseUrl(url: string): UrlTree;
|
|
227
|
+
isActive(url: any, exact?: any): boolean;
|
|
228
|
+
navigate(commands: any[], extras?: any): Promise<boolean>;
|
|
229
|
+
navigateByUrl(url: any, extras?: any): Promise<boolean>;
|
|
230
|
+
back(options?: any): void;
|
|
231
|
+
backToPreviousPage(): void;
|
|
232
|
+
canGoBack(options?: any): boolean;
|
|
233
|
+
canGoBackToPreviousPage(): boolean;
|
|
234
|
+
/** A route guard of the route registered under \`route\`, called with Angular's arguments for its kind. */
|
|
235
|
+
addGuard(route: number, kind: string, guard: (a: any, b: any, c: any, d: any) => any): void;
|
|
236
|
+
}
|
|
237
|
+
export declare class KitNativeDialogRef { static readonly current: KitNativeDialogRef; readonly data: any; close(result?: any): void; afterClosed(): RxObservable<any> }
|
|
238
|
+
export declare class KitNativeDialogService { static readonly shared: KitNativeDialogService; open(component: any, config?: any): KitNativeDialogRef }
|
|
239
|
+
/** A component's own injector, from its @Component providers: classes, and { provide, useClass | useValue | useFactory | useExisting }. */
|
|
240
|
+
export declare class NodeInjector { static enter(providers: any[]): NodeInjector; leave(): void }
|
|
241
|
+
/** A pure Angular pipe at one binding site: \`transform\` runs when an argument is no longer \`Object.is\` the last one. */
|
|
242
|
+
export declare class PurePipeCache {
|
|
243
|
+
pure1<A, R>(a: A, transform: (a: A) => R): R;
|
|
244
|
+
pure2<A, B, R>(a: A, b: B, transform: (a: A, b: B) => R): R;
|
|
245
|
+
pure3<A, B, C, R>(a: A, b: B, c: C, transform: (a: A, b: B, c: C) => R): R;
|
|
246
|
+
pure4<A, B, C, D, R>(a: A, b: B, c: C, d: D, transform: (a: A, b: B, c: C, d: D) => R): R;
|
|
247
|
+
pure5<A, B, C, D, E, R>(a: A, b: B, c: C, d: D, e: E, transform: (a: A, b: B, c: C, d: D, e: E) => R): R;
|
|
248
|
+
}
|
|
249
|
+
`,
|
|
250
|
+
'@angular/common': `
|
|
251
|
+
export declare class Location {
|
|
252
|
+
path(includeHash?: boolean): string;
|
|
253
|
+
go(path: string, query?: string, state?: any): void;
|
|
254
|
+
replaceState(path: string, query?: string, state?: any): void;
|
|
255
|
+
back(): void;
|
|
256
|
+
forward(): void;
|
|
257
|
+
static joinWithSlash(start: string, end: string): string;
|
|
258
|
+
static stripTrailingSlash(url: string): string;
|
|
259
|
+
}
|
|
260
|
+
export declare function isPlatformBrowser(platformId: Object): boolean;
|
|
261
|
+
export declare function isPlatformServer(platformId: Object): boolean;
|
|
262
|
+
export declare const DOCUMENT: import('@angular/core').InjectionToken<any>;
|
|
263
|
+
export declare const CommonModule: any;
|
|
264
|
+
export declare const NgIf: any;
|
|
265
|
+
export declare const NgFor: any;
|
|
266
|
+
export declare const NgForOf: any;
|
|
267
|
+
export declare const NgClass: any;
|
|
268
|
+
export declare const NgStyle: any;
|
|
269
|
+
export declare const NgSwitch: any;
|
|
270
|
+
export declare const NgSwitchCase: any;
|
|
271
|
+
export declare const NgSwitchDefault: any;
|
|
272
|
+
export declare const NgTemplateOutlet: any;
|
|
273
|
+
export declare const AsyncPipe: any;
|
|
274
|
+
export declare const DatePipe: any;
|
|
275
|
+
export declare const DecimalPipe: any;
|
|
276
|
+
export declare const PercentPipe: any;
|
|
277
|
+
export declare const CurrencyPipe: any;
|
|
278
|
+
export declare const UpperCasePipe: any;
|
|
279
|
+
export declare const LowerCasePipe: any;
|
|
280
|
+
export declare const TitleCasePipe: any;
|
|
281
|
+
export declare const SlicePipe: any;
|
|
282
|
+
export declare const JsonPipe: any;
|
|
283
|
+
export declare const KeyValuePipe: any;
|
|
284
|
+
`,
|
|
285
|
+
'@angular/common/http': `
|
|
286
|
+
import type { Observable } from 'rxjs';
|
|
287
|
+
import {
|
|
288
|
+
HttpHeaders,
|
|
289
|
+
HttpParams,
|
|
290
|
+
HttpContextToken,
|
|
291
|
+
HttpContext,
|
|
292
|
+
HttpResponse,
|
|
293
|
+
HttpErrorResponse,
|
|
294
|
+
HttpRequest,
|
|
295
|
+
HTTP_INTERCEPTORS,
|
|
296
|
+
HttpStatusCode,
|
|
297
|
+
withInterceptors,
|
|
298
|
+
withInterceptorsFromDi,
|
|
299
|
+
withFetch,
|
|
300
|
+
provideHttpClient,
|
|
301
|
+
HttpClientModule,
|
|
302
|
+
} from '@angular#kit';
|
|
303
|
+
export {
|
|
304
|
+
HttpHeaders,
|
|
305
|
+
HttpParams,
|
|
306
|
+
HttpContextToken,
|
|
307
|
+
HttpContext,
|
|
308
|
+
HttpResponse,
|
|
309
|
+
HttpErrorResponse,
|
|
310
|
+
HttpRequest,
|
|
311
|
+
HTTP_INTERCEPTORS,
|
|
312
|
+
HttpStatusCode,
|
|
313
|
+
withInterceptors,
|
|
314
|
+
withInterceptorsFromDi,
|
|
315
|
+
withFetch,
|
|
316
|
+
provideHttpClient,
|
|
317
|
+
HttpClientModule,
|
|
318
|
+
};
|
|
319
|
+
export interface HttpHandler { handle(req: HttpRequest<any>): Observable<any> }
|
|
320
|
+
export interface HttpInterceptor { intercept(req: HttpRequest<any>, next: HttpHandler): Observable<any> }
|
|
321
|
+
export type HttpInterceptorFn = (req: HttpRequest<any>, next: (req: HttpRequest<any>) => Observable<any>) => Observable<any>;
|
|
322
|
+
export type HttpEvent<T = any> = HttpResponse<T>;
|
|
323
|
+
export declare class HttpClient {
|
|
324
|
+
request<T = any>(first: string | HttpRequest<any>, url?: string, options?: any): Observable<T>;
|
|
325
|
+
get<T = any>(url: string, options?: { headers?: Record<string, string> | HttpHeaders; params?: Record<string, any> | HttpParams; responseType?: 'json'; observe?: any; context?: HttpContext }): Observable<T>;
|
|
326
|
+
get(url: string, options: { headers?: Record<string, string> | HttpHeaders; params?: Record<string, any> | HttpParams; responseType: 'text'; observe?: any; context?: HttpContext }): Observable<string>;
|
|
327
|
+
delete<T = any>(url: string, options?: any): Observable<T>;
|
|
328
|
+
head<T = any>(url: string, options?: any): Observable<T>;
|
|
329
|
+
options<T = any>(url: string, options?: any): Observable<T>;
|
|
330
|
+
post<T = any>(url: string, body: any, options?: any): Observable<T>;
|
|
331
|
+
put<T = any>(url: string, body: any, options?: any): Observable<T>;
|
|
332
|
+
patch<T = any>(url: string, body: any, options?: any): Observable<T>;
|
|
333
|
+
jsonp<T = any>(url: string, callbackParam: string): Observable<T>;
|
|
334
|
+
}
|
|
335
|
+
`,
|
|
336
|
+
'@angular/core': `
|
|
337
|
+
import { TeardownHandle } from '@angular#kit';
|
|
338
|
+
export type ValueEqualityFn<T> = (a: T, b: T) => boolean;
|
|
339
|
+
export interface CreateComputedOptions<T> { equal?: ValueEqualityFn<T> }
|
|
340
|
+
export interface CreateSignalOptions<T> { equal?: ValueEqualityFn<T> }
|
|
341
|
+
export interface WritableSignal<T> { (): T; set(value: T): void; update(fn: (value: T) => T): void; asReadonly(): Signal<T> }
|
|
342
|
+
export interface Signal<T> { (): T }
|
|
343
|
+
/** \`$assign\`: a decorated input the component writes itself (\`this.x = v\`), until its parent's binding changes. */
|
|
344
|
+
export interface InputSignal<T> { (): T; $assign(value: T): void }
|
|
345
|
+
export interface ModelSignal<T> extends WritableSignal<T> { $assign(value: T): void; subscribe(fn: (value: T) => void): TeardownHandle }
|
|
346
|
+
export interface OutputEmitterRef<T> { emit(value: T): void; subscribe(fn: (value: T) => void): TeardownHandle }
|
|
347
|
+
export interface OutputRef<T> { subscribe(fn: (value: T) => void): TeardownHandle }
|
|
348
|
+
export declare function signal<T>(value: T, options?: CreateSignalOptions<T>): WritableSignal<T>;
|
|
349
|
+
export declare function computed<T>(fn: () => T, options?: CreateComputedOptions<T>): Signal<T>;
|
|
350
|
+
export declare function linkedSignal<T>(fn: () => T, options?: CreateComputedOptions<T>): WritableSignal<T>;
|
|
351
|
+
export declare function linkedSignal<S, D>(options: { source: () => S; computation: (source: S, previous?: { source: S; value: D }) => D; equal?: ValueEqualityFn<D>; debugName?: string }): WritableSignal<D>;
|
|
352
|
+
export declare function isSignal(value: unknown): value is Signal<unknown>;
|
|
353
|
+
export declare function isDevMode(): boolean;
|
|
354
|
+
export declare function enableProdMode(): void;
|
|
355
|
+
export type Provider = any;
|
|
356
|
+
export type EnvironmentProviders = any;
|
|
357
|
+
export type ModuleWithProviders<T = any> = any;
|
|
358
|
+
export type Type<T = any> = any;
|
|
359
|
+
export declare function makeEnvironmentProviders(providers: any[]): EnvironmentProviders;
|
|
360
|
+
export declare function provideEnvironmentInitializer(fn: () => void): EnvironmentProviders;
|
|
361
|
+
export declare function provideAppInitializer(fn: () => any): EnvironmentProviders;
|
|
362
|
+
export declare function importProvidersFrom(...modules: any[]): EnvironmentProviders;
|
|
363
|
+
export declare class ErrorHandler { handleError(error: any): void }
|
|
364
|
+
export declare function input<T>(value: T, options?: any): InputSignal<T>;
|
|
365
|
+
export declare function input<T>(): InputSignal<T | undefined>;
|
|
366
|
+
export declare namespace input { function required<T>(options?: any): InputSignal<T>; }
|
|
367
|
+
export declare function model<T>(value: T, options?: any): ModelSignal<T>;
|
|
368
|
+
export declare function model<T>(): ModelSignal<T | undefined>;
|
|
369
|
+
export declare namespace model { function required<T>(options?: any): ModelSignal<T>; }
|
|
370
|
+
export declare function output<T = void>(options?: any): OutputEmitterRef<T>;
|
|
371
|
+
export declare class InjectionToken<T = any> { readonly _desc: string; readonly _type?: T; constructor(description: string, options?: { providedIn?: 'root' | 'platform' | 'any' | null; factory: () => T }) }
|
|
372
|
+
export declare function inject<T>(token: InjectionToken<T>): T;
|
|
373
|
+
export declare function inject<T>(token: { prototype: T }): T;
|
|
374
|
+
export declare function inject<T>(token: InjectionToken<T>, options: { optional: true; self?: boolean; skipSelf?: boolean; host?: boolean }): T | null;
|
|
375
|
+
export declare function inject<T>(token: { prototype: T }, options: { optional: true; self?: boolean; skipSelf?: boolean; host?: boolean }): T | null;
|
|
376
|
+
export declare function inject<T>(token: InjectionToken<T>, options?: any): T;
|
|
377
|
+
export declare function inject<T>(token: { prototype: T }, options?: any): T;
|
|
378
|
+
export declare function inject<T = any>(token: any, options?: any): T;
|
|
379
|
+
export declare function runInInjectionContext<ReturnT>(injector: Injector, fn: () => ReturnT): ReturnT;
|
|
380
|
+
export declare function forwardRef(forwardRefFn: () => any): any;
|
|
381
|
+
export declare function resolveForwardRef<T>(type: T): T;
|
|
382
|
+
export declare function Component(meta: any): <C>(c: C) => C;
|
|
383
|
+
export declare function Injectable(meta?: any): <C>(c: C) => C;
|
|
384
|
+
export declare const NO_ERRORS_SCHEMA: any;
|
|
385
|
+
export declare const CUSTOM_ELEMENTS_SCHEMA: any;
|
|
386
|
+
export declare function NgModule(meta: any): <C>(c: C) => C;
|
|
387
|
+
export declare function Input(options?: any): any;
|
|
388
|
+
export declare function Output(options?: any): any;
|
|
389
|
+
export declare class EventEmitter<T = any> {
|
|
390
|
+
constructor(isAsync?: boolean);
|
|
391
|
+
emit(value?: T): void;
|
|
392
|
+
next(value?: T): void;
|
|
393
|
+
subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): TeardownHandle;
|
|
394
|
+
subscribe(observer?: { next?: (value: T) => void; error?: (e: any) => void; complete?: () => void } | null): TeardownHandle;
|
|
395
|
+
}
|
|
396
|
+
export declare enum ChangeDetectionStrategy { OnPush = 0, Eager = 1, Default = 1 }
|
|
397
|
+
export declare enum ViewEncapsulation { Emulated = 0, None = 2, ShadowDom = 3, ExperimentalIsolatedShadowDom = 4 }
|
|
398
|
+
export declare function provideZoneChangeDetection(options?: any): any;
|
|
399
|
+
export declare function provideZonelessChangeDetection(): any;
|
|
400
|
+
export interface EffectRef { destroy(): void }
|
|
401
|
+
export declare function effect(fn: (onCleanup: (cleanup: () => void) => void) => void, options?: any): EffectRef;
|
|
402
|
+
export declare function untracked<T>(fn: () => T): T;
|
|
403
|
+
export declare class Injector {
|
|
404
|
+
static create(options: { providers: any[]; parent?: Injector; name?: string } | any[], parent?: Injector): Injector;
|
|
405
|
+
get<T>(token: InjectionToken<T>, notFoundValue?: T, options?: any): T;
|
|
406
|
+
get<T>(token: { prototype: T }, notFoundValue?: T, options?: any): T;
|
|
407
|
+
get<T = any>(token: any, notFoundValue?: T, options?: any): T;
|
|
408
|
+
}
|
|
409
|
+
export declare class EnvironmentInjector extends Injector {}
|
|
410
|
+
export declare function ViewChild(selector: any, options?: any): any;
|
|
411
|
+
export declare function ViewChildren(selector: any, options?: any): any;
|
|
412
|
+
export declare function ContentChild(selector: any, options?: any): any;
|
|
413
|
+
export declare function ContentChildren(selector: any, options?: any): any;
|
|
414
|
+
export declare function viewChild<T = any>(locator: any, options?: any): Signal<T | undefined>;
|
|
415
|
+
export declare namespace viewChild { function required<T = any>(locator: any, options?: any): Signal<T>; }
|
|
416
|
+
export declare function viewChildren<T = any>(locator: any, options?: any): Signal<readonly T[]>;
|
|
417
|
+
export declare function contentChild<T = any>(locator: any, options?: any): Signal<T | undefined>;
|
|
418
|
+
export declare namespace contentChild { function required<T = any>(locator: any, options?: any): Signal<T>; }
|
|
419
|
+
export declare function contentChildren<T = any>(locator: any, options?: any): Signal<readonly T[]>;
|
|
420
|
+
export declare function Pipe(meta: { name: string; pure?: boolean; standalone?: boolean }): <C>(c: C) => C;
|
|
421
|
+
export interface PipeTransform { transform(value: any, ...args: any[]): any }
|
|
422
|
+
export declare function Directive(meta?: any): <C>(c: C) => C;
|
|
423
|
+
export declare function HostListener(event: string, args?: string[]): any;
|
|
424
|
+
export declare function HostBinding(property?: string): any;
|
|
425
|
+
export declare const Inject: { (token: any): any; new (token: any): any };
|
|
426
|
+
export declare const Optional: { (): any; new (): any };
|
|
427
|
+
export declare const Self: { (): any; new (): any };
|
|
428
|
+
export declare const SkipSelf: { (): any; new (): any };
|
|
429
|
+
export declare const Host: { (): any; new (): any };
|
|
430
|
+
export declare const PLATFORM_ID: InjectionToken<Object>;
|
|
431
|
+
export declare const APP_INITIALIZER: InjectionToken<readonly (() => any)[]>;
|
|
432
|
+
export declare const ENVIRONMENT_INITIALIZER: InjectionToken<readonly (() => void)[]>;
|
|
433
|
+
export declare abstract class ChangeDetectorRef { markForCheck(): void; detectChanges(): void; detach(): void; reattach(): void; checkNoChanges(): void }
|
|
434
|
+
/** A template's view: what a native element is to Angular, read untyped (its type argument is the app's claim). */
|
|
435
|
+
export declare class ElementRef<T = any> { constructor(nativeElement?: any); readonly nativeElement: any }
|
|
436
|
+
export declare class TemplateRef<C = any> { readonly elementRef: ElementRef; constructor(elementRef?: ElementRef) }
|
|
437
|
+
export declare class EmbeddedViewRef<C = any> { context: C; readonly rootNodes: any[]; readonly destroyed: boolean; destroy(): void; detectChanges(): void; markForCheck(): void }
|
|
438
|
+
export declare class ComponentRef<C = any> { readonly instance: C; readonly location: ElementRef; readonly injector: Injector; readonly hostView: EmbeddedViewRef<C>; setInput(name: string, value: unknown): void; destroy(): void }
|
|
439
|
+
export declare class ViewContainerRef {
|
|
440
|
+
readonly element: ElementRef;
|
|
441
|
+
readonly injector: Injector;
|
|
442
|
+
readonly length: number;
|
|
443
|
+
clear(): void;
|
|
444
|
+
createEmbeddedView<C = any>(templateRef: TemplateRef<C>, context?: C, options?: any): EmbeddedViewRef<C>;
|
|
445
|
+
createComponent<C = any>(componentType: Type<C>, options?: any): ComponentRef<C>;
|
|
446
|
+
remove(index?: number): void;
|
|
447
|
+
}
|
|
448
|
+
export declare class ApplicationRef { readonly isStable: any; tick(): void; destroy(): void }
|
|
449
|
+
export declare class SimpleChange { constructor(previousValue: any, currentValue: any, firstChange: boolean); previousValue: any; currentValue: any; firstChange: boolean; isFirstChange(): boolean }
|
|
450
|
+
export type SimpleChanges<T = any> = { [propName: string]: SimpleChange };
|
|
451
|
+
export interface OnChanges { ngOnChanges(changes: SimpleChanges): void }
|
|
452
|
+
export declare class QueryList<T> {
|
|
453
|
+
readonly length: number;
|
|
454
|
+
readonly first: T;
|
|
455
|
+
readonly last: T;
|
|
456
|
+
readonly dirty: boolean;
|
|
457
|
+
toArray(): T[];
|
|
458
|
+
get(index: number): T | undefined;
|
|
459
|
+
forEach(fn: (item: T, index: number, array: T[]) => void): void;
|
|
460
|
+
map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
|
|
461
|
+
filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
|
|
462
|
+
find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
|
|
463
|
+
some(fn: (item: T, index: number, array: T[]) => boolean): boolean;
|
|
464
|
+
notifyOnChanges(): void;
|
|
465
|
+
readonly changes: { subscribe(observerOrNext?: ((value: QueryList<T>) => void) | { next?: (value: QueryList<T>) => void; error?: (e: any) => void; complete?: () => void } | null): { unsubscribe(): void } };
|
|
466
|
+
}
|
|
467
|
+
export declare class DestroyRef { onDestroy(callback: () => void): () => void }
|
|
468
|
+
export declare class NgZone {
|
|
469
|
+
static isInAngularZone(): boolean;
|
|
470
|
+
readonly onStable: EventEmitter<any>;
|
|
471
|
+
readonly onMicrotaskEmpty: EventEmitter<any>;
|
|
472
|
+
readonly onUnstable: EventEmitter<any>;
|
|
473
|
+
readonly onError: EventEmitter<any>;
|
|
474
|
+
readonly isStable: boolean;
|
|
475
|
+
run<T>(fn: () => T): T;
|
|
476
|
+
runOutsideAngular<T>(fn: () => T): T;
|
|
477
|
+
runGuarded<T>(fn: () => T): T;
|
|
478
|
+
runTask<T>(fn: () => T): T;
|
|
479
|
+
}
|
|
480
|
+
export interface OnDestroy { ngOnDestroy(): void }
|
|
481
|
+
export interface OnInit { ngOnInit(): void }
|
|
482
|
+
export interface AfterViewInit { ngAfterViewInit(): void }
|
|
483
|
+
export interface AfterContentInit { ngAfterContentInit(): void }
|
|
484
|
+
export interface AfterViewChecked { ngAfterViewChecked(): void }
|
|
485
|
+
export interface AfterContentChecked { ngAfterContentChecked(): void }
|
|
486
|
+
export interface DoCheck { ngDoCheck(): void }
|
|
487
|
+
`,
|
|
488
|
+
'@angular/core/rxjs-interop': `
|
|
489
|
+
import type { Observable, OperatorFunction } from 'rxjs';
|
|
490
|
+
import type { Signal, DestroyRef } from '@angular/core';
|
|
491
|
+
export declare function toSignal<T>(source: Observable<T>, options: { initialValue: T; injector?: any; requireSync?: boolean; manualCleanup?: boolean; equal?: any }): Signal<T>;
|
|
492
|
+
export declare function toSignal<T>(source: Observable<T>, options: { requireSync: true; injector?: any; manualCleanup?: boolean; equal?: any }): Signal<T>;
|
|
493
|
+
export declare function toSignal<T>(source: Observable<T>, options?: { injector?: any; requireSync?: boolean; manualCleanup?: boolean; equal?: any }): Signal<T | undefined>;
|
|
494
|
+
export declare function toObservable<T>(source: Signal<T>, options?: { injector?: any }): Observable<T>;
|
|
495
|
+
export declare function takeUntilDestroyed<T>(destroyRef?: DestroyRef): OperatorFunction<T, T>;
|
|
496
|
+
`,
|
|
497
|
+
'@angular/router': `
|
|
498
|
+
import type { Observable } from 'rxjs';
|
|
499
|
+
import {
|
|
500
|
+
ActivatedRouteSnapshot,
|
|
501
|
+
convertToParamMap,
|
|
502
|
+
createRouterStateSnapshot,
|
|
503
|
+
DefaultUrlSerializer,
|
|
504
|
+
NavigationCancel,
|
|
505
|
+
NavigationEnd,
|
|
506
|
+
NavigationError,
|
|
507
|
+
NavigationStart,
|
|
508
|
+
ParamMap,
|
|
509
|
+
provideRouter,
|
|
510
|
+
ResolveEnd,
|
|
511
|
+
ResolveStart,
|
|
512
|
+
RoutesRecognized,
|
|
513
|
+
RouterStateSnapshot,
|
|
514
|
+
UrlSegment,
|
|
515
|
+
UrlTree,
|
|
516
|
+
} from '@angular#kit';
|
|
517
|
+
export {
|
|
518
|
+
RouterStateSnapshot,
|
|
519
|
+
ActivatedRouteSnapshot,
|
|
520
|
+
convertToParamMap,
|
|
521
|
+
createRouterStateSnapshot,
|
|
522
|
+
DefaultUrlSerializer,
|
|
523
|
+
NavigationCancel,
|
|
524
|
+
NavigationEnd,
|
|
525
|
+
NavigationError,
|
|
526
|
+
NavigationStart,
|
|
527
|
+
ParamMap,
|
|
528
|
+
provideRouter,
|
|
529
|
+
ResolveEnd,
|
|
530
|
+
ResolveStart,
|
|
531
|
+
RoutesRecognized,
|
|
532
|
+
UrlSegment,
|
|
533
|
+
UrlTree,
|
|
534
|
+
};
|
|
535
|
+
export declare class ActivatedRoute {
|
|
536
|
+
snapshot: ActivatedRouteSnapshot;
|
|
537
|
+
params: Observable<Record<string, string>>;
|
|
538
|
+
queryParams: Observable<Record<string, string>>;
|
|
539
|
+
data: Observable<Record<string, any>>;
|
|
540
|
+
paramMap: Observable<ParamMap>;
|
|
541
|
+
queryParamMap: Observable<ParamMap>;
|
|
542
|
+
fragment: Observable<string | null>;
|
|
543
|
+
title: Observable<string | undefined>;
|
|
544
|
+
outlet: string;
|
|
545
|
+
routeConfig: any;
|
|
546
|
+
readonly root: ActivatedRoute;
|
|
547
|
+
readonly parent: ActivatedRoute | null;
|
|
548
|
+
readonly firstChild: ActivatedRoute | null;
|
|
549
|
+
readonly children: ActivatedRoute[];
|
|
550
|
+
readonly pathFromRoot: ActivatedRoute[];
|
|
551
|
+
}
|
|
552
|
+
export type Event = NavigationEnd | NavigationStart | NavigationCancel | NavigationError | RoutesRecognized | ResolveStart | ResolveEnd;
|
|
553
|
+
export type NavigationExtras = any;
|
|
554
|
+
export declare class Router {
|
|
555
|
+
readonly url: string;
|
|
556
|
+
readonly routerState: any;
|
|
557
|
+
readonly events: Observable<Event>;
|
|
558
|
+
createUrlTree(commands: any[], extras?: NavigationExtras): UrlTree;
|
|
559
|
+
serializeUrl(url: UrlTree): string;
|
|
560
|
+
parseUrl(url: string): UrlTree;
|
|
561
|
+
isActive(url: string | UrlTree, exact?: any): boolean;
|
|
562
|
+
navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
|
|
563
|
+
navigateByUrl(url: string | UrlTree, extras?: NavigationExtras): Promise<boolean>;
|
|
564
|
+
}
|
|
565
|
+
export interface Route {
|
|
566
|
+
path?: string;
|
|
567
|
+
component?: any;
|
|
568
|
+
redirectTo?: string;
|
|
569
|
+
pathMatch?: string;
|
|
570
|
+
outlet?: string;
|
|
571
|
+
data?: Record<string, any>;
|
|
572
|
+
canActivate?: any[];
|
|
573
|
+
canActivateChild?: any[];
|
|
574
|
+
canDeactivate?: any[];
|
|
575
|
+
canMatch?: any[];
|
|
576
|
+
resolve?: Record<string, any>;
|
|
577
|
+
providers?: any[];
|
|
578
|
+
children?: Route[];
|
|
579
|
+
loadChildren?: () => any;
|
|
580
|
+
loadComponent?: () => any;
|
|
581
|
+
title?: any;
|
|
582
|
+
}
|
|
583
|
+
export type Routes = Route[];
|
|
584
|
+
export type Params = { [key: string]: any };
|
|
585
|
+
export interface IsActiveMatchOptions { matrixParams: 'exact' | 'subset' | 'ignored'; queryParams: 'exact' | 'subset' | 'ignored'; paths: 'exact' | 'subset'; fragment: 'exact' | 'ignored' }
|
|
586
|
+
export type GuardResult = boolean | UrlTree;
|
|
587
|
+
export type MaybeAsync<T> = T | Observable<T> | Promise<T>;
|
|
588
|
+
export type CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => MaybeAsync<GuardResult>;
|
|
589
|
+
export type CanActivateChildFn = (childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot) => MaybeAsync<GuardResult>;
|
|
590
|
+
export type CanDeactivateFn<T> = (component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState: RouterStateSnapshot) => MaybeAsync<GuardResult>;
|
|
591
|
+
export type CanMatchFn = (route: Route, segments: UrlSegment[]) => MaybeAsync<GuardResult>;
|
|
592
|
+
export interface CanActivate { canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): MaybeAsync<GuardResult> }
|
|
593
|
+
export interface CanActivateChild { canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): MaybeAsync<GuardResult> }
|
|
594
|
+
export interface CanDeactivate<T> { canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState: RouterStateSnapshot): MaybeAsync<GuardResult> }
|
|
595
|
+
export interface CanMatch { canMatch(route: Route, segments: UrlSegment[]): MaybeAsync<GuardResult> }
|
|
596
|
+
export declare const RouterModule: { forRoot(routes: Routes, config?: any): any; forChild(routes: Routes): any };
|
|
597
|
+
export declare function provideRouter(routes?: any, ...features: any[]): any;
|
|
598
|
+
export declare const RouterOutlet: any;
|
|
599
|
+
export declare const RouterLink: any;
|
|
600
|
+
export declare const RouterLinkActive: any;
|
|
601
|
+
`,
|
|
602
|
+
// What an app implements of @angular/forms (runtime/angular-forms.ts re-exports them): declarations, no classes.
|
|
603
|
+
'@angular#forms': `
|
|
604
|
+
import type { Observable } from 'rxjs';
|
|
605
|
+
import type { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
606
|
+
export interface Validator {
|
|
607
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
608
|
+
registerOnValidatorChange?(fn: () => void): void;
|
|
609
|
+
}
|
|
610
|
+
export interface AsyncValidator extends Validator {
|
|
611
|
+
validate(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
|
|
612
|
+
}
|
|
613
|
+
export interface ControlValueAccessor {
|
|
614
|
+
writeValue(obj: any): void;
|
|
615
|
+
registerOnChange(fn: any): void;
|
|
616
|
+
registerOnTouched(fn: any): void;
|
|
617
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
618
|
+
}
|
|
619
|
+
`,
|
|
620
|
+
'@nativescript/angular': `
|
|
621
|
+
import type { Observable } from 'rxjs';
|
|
622
|
+
import type { UrlTree } from '@angular#kit';
|
|
623
|
+
export type NavigationExtras = any;
|
|
624
|
+
export declare class RouterExtensions {
|
|
625
|
+
readonly router: { readonly url: string; readonly events: Observable<any>; readonly routerState: any };
|
|
626
|
+
readonly url: string;
|
|
627
|
+
readonly events: Observable<any>;
|
|
628
|
+
navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
|
|
629
|
+
navigateByUrl(url: string | UrlTree, extras?: NavigationExtras): Promise<boolean>;
|
|
630
|
+
back(options?: { relativeTo?: any; outlets?: string[] }): void;
|
|
631
|
+
backToPreviousPage(): void;
|
|
632
|
+
canGoBack(options?: any): boolean;
|
|
633
|
+
canGoBackToPreviousPage(): boolean;
|
|
634
|
+
}
|
|
635
|
+
export declare const NativeDialogModule: any;
|
|
636
|
+
export declare const NATIVE_DIALOG_DATA: import('@angular/core').InjectionToken<any>;
|
|
637
|
+
export declare function registerElement(name: string, resolver: () => any, meta?: any): void;
|
|
638
|
+
export declare function isAngularHmrRestoringRoute(): boolean;
|
|
639
|
+
export declare const ActionBarComponent: any;
|
|
640
|
+
export declare const ActionItemDirective: any;
|
|
641
|
+
export declare const NavigationButtonDirective: any;
|
|
642
|
+
export declare const TabViewDirective: any;
|
|
643
|
+
export declare const TabViewItemDirective: any;
|
|
644
|
+
export declare const NSEmptyOutletComponent: any;
|
|
645
|
+
export declare function provideNativeScriptHttpClient(...features: any[]): any;
|
|
646
|
+
export declare function provideNativeScriptRouter(routes?: any, ...features: any[]): any;
|
|
647
|
+
export declare function provideNativeScriptNgZone(options?: any): any;
|
|
648
|
+
export declare function bootstrapApplication(component: any, options?: any): Promise<any>;
|
|
649
|
+
export type NativeDialogConfig<D = any> = { data?: D; nativeOptions?: any; [key: string]: any };
|
|
650
|
+
export declare class NativeDialogRef<T = any, R = any> { readonly componentInstance: T; close(result?: R): void; afterClosed(): Observable<R | undefined> }
|
|
651
|
+
export declare class NativeDialogService { open<T = any, D = any, R = any>(component: any, config?: NativeDialogConfig<D>): NativeDialogRef<T, R>; closeAll(): void }
|
|
652
|
+
export { NativeDialogService as NativeDialog };
|
|
653
|
+
export declare const NativeScriptCommonModule: any;
|
|
654
|
+
export declare const NativeScriptFormsModule: any;
|
|
655
|
+
export declare const NativeScriptHttpClientModule: any;
|
|
656
|
+
export declare const NativeScriptModule: any;
|
|
657
|
+
export declare const NativeScriptRouterModule: { forRoot(routes: any, config?: any): any; forChild(routes: any): any };
|
|
658
|
+
export declare function platformNativeScript(): { bootstrapModule(module: any, options?: any): Promise<any> };
|
|
659
|
+
export declare function runNativeScriptAngularApp(options: any): void;
|
|
660
|
+
export declare const PageRouterOutlet: any;
|
|
661
|
+
export declare const RouterOutlet: any;
|
|
662
|
+
export declare const NSRouterLink: any;
|
|
663
|
+
export declare const NSRouterLinkActive: any;
|
|
664
|
+
`,
|
|
665
|
+
};
|
|
666
|
+
/** rxjs, for a build that does not compile packages from their source. */
|
|
667
|
+
const RXJS = `
|
|
668
|
+
export declare class Subscription { readonly closed: boolean; unsubscribe(): void }
|
|
669
|
+
export interface OperatorFunction<T, R> { readonly __operator: [T, R] }
|
|
670
|
+
export declare class Observable<T> {
|
|
671
|
+
subscribe(next: (value: T) => void): Subscription;
|
|
672
|
+
pipe<A>(a: OperatorFunction<T, A>): Observable<A>;
|
|
673
|
+
pipe<A, B>(a: OperatorFunction<T, A>, b: OperatorFunction<A, B>): Observable<B>;
|
|
674
|
+
pipe<A, B, C>(a: OperatorFunction<T, A>, b: OperatorFunction<A, B>, c: OperatorFunction<B, C>): Observable<C>;
|
|
675
|
+
}
|
|
676
|
+
export declare class Subject<T> extends Observable<T> { next(value: T): void; asObservable(): Observable<T> }
|
|
677
|
+
export declare class BehaviorSubject<T> extends Subject<T> { constructor(value: T); readonly value: T; getValue(): T }
|
|
678
|
+
export declare class ReplaySubject<T> extends Subject<T> { constructor(bufferSize?: number) }
|
|
679
|
+
export declare function map<T, R>(project: (value: T, index: number) => R): OperatorFunction<T, R>;
|
|
680
|
+
export declare function filter<T, S extends T>(predicate: (value: T, index: number) => value is S): OperatorFunction<T, S>;
|
|
681
|
+
export declare function filter<T>(predicate: (value: T, index: number) => boolean): OperatorFunction<T, T>;
|
|
682
|
+
export declare function take<T>(count: number): OperatorFunction<T, T>;
|
|
683
|
+
export declare function firstValueFrom<T>(source: Observable<T>): Promise<T>;
|
|
684
|
+
`;
|
|
685
|
+
export const modules = {
|
|
686
|
+
shims: SHIMS,
|
|
687
|
+
fallbackShims: { rxjs: RXJS },
|
|
688
|
+
substitutions: {
|
|
689
|
+
...Object.fromEntries(['@angular/common/http', '@angular/core/rxjs-interop', '@angular/router', '@nativescript/angular'].map((m) => [m, { file: RX_FILE, sourcesOnly: true }])),
|
|
690
|
+
'@angular#rx': { file: RX_FILE, sourcesOnly: true, otherwise: '@angular#kit' },
|
|
691
|
+
// Its controls are read untyped as often as typed (`form.get('name').value`).
|
|
692
|
+
'@angular/forms': { file: FORMS_FILE, membersByName: true },
|
|
693
|
+
},
|
|
694
|
+
// `<package>/angular`, whose components `angularLibraries` compiles with the app's.
|
|
695
|
+
isLibraryEntry: (specifier, source, virtual) => specifier === `${core.packageOf(specifier)}/angular` && virtual.some((f) => f.endsWith('.release.ts') && f.startsWith(dirname(source) + '/')),
|
|
696
|
+
// `@Inject(token)`: the class's factory injects that token.
|
|
697
|
+
parameterDecorators: ['Inject'],
|
|
698
|
+
};
|