build: typescript 3.7 support (#33717)
This PR updates TypeScript version to 3.7 while retaining compatibility with TS3.6. PR Close #33717
This commit is contained in:
parent
d7ea389c84
commit
1f79e624d1
|
@ -35,7 +35,7 @@
|
|||
"rollup-plugin-node-resolve": "5.2.0",
|
||||
"rollup-plugin-sourcemaps": "0.4.2",
|
||||
"terser": "4.3.9",
|
||||
"typescript": "3.6.4"
|
||||
"typescript": "3.7.4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "bazel build ... --noshow_progress && bazel test ...",
|
||||
|
|
|
@ -3397,10 +3397,10 @@ type-is@~1.6.17:
|
|||
media-typer "0.3.0"
|
||||
mime-types "~2.1.24"
|
||||
|
||||
typescript@3.6.4:
|
||||
version "3.6.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d"
|
||||
integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==
|
||||
typescript@3.7.4:
|
||||
version "3.7.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.4.tgz#1743a5ec5fef6a1fa9f3e4708e33c81c73876c19"
|
||||
integrity sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==
|
||||
|
||||
typescript@~3.5.3:
|
||||
version "3.5.3"
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
|
||||
|
||||
import * as animations from '@angular/animations';
|
||||
import * as animationsBrowser from '@angular/animations/browser';
|
||||
import * as animationsBrowserTesting from '@angular/animations/browser/testing';
|
||||
import * as common from '@angular/common';
|
||||
import * as commonHttp from '@angular/common/http';
|
||||
import * as commonTesting from '@angular/common/testing';
|
||||
import * as commonHttpTesting from '@angular/common/testing';
|
||||
import * as compiler from '@angular/compiler';
|
||||
import * as compilerTesting from '@angular/compiler/testing';
|
||||
import * as core from '@angular/core';
|
||||
import * as coreTesting from '@angular/core/testing';
|
||||
import * as elements from '@angular/elements';
|
||||
import * as forms from '@angular/forms';
|
||||
// Current plan for Angular 8 is to stop building the @angular/http package
|
||||
// import * as http from '@angular/http';
|
||||
// import * as httpTesting from '@angular/http/testing';
|
||||
import * as platformBrowser from '@angular/platform-browser';
|
||||
import * as platformBrowserDynamic from '@angular/platform-browser-dynamic';
|
||||
import * as platformBrowserDynamicTesting from '@angular/platform-browser-dynamic/testing';
|
||||
import * as platformBrowserAnimations from '@angular/platform-browser/animations';
|
||||
import * as platformBrowserTesting from '@angular/platform-browser/testing';
|
||||
import * as platformServer from '@angular/platform-server';
|
||||
import * as platformServerTesting from '@angular/platform-server/testing';
|
||||
import * as platformWebworker from '@angular/platform-webworker';
|
||||
import * as platformWebworkerDynamic from '@angular/platform-webworker-dynamic';
|
||||
import * as router from '@angular/router';
|
||||
import * as routerTesting from '@angular/router/testing';
|
||||
import * as routerUpgrade from '@angular/router/upgrade';
|
||||
import * as serviceWorker from '@angular/service-worker';
|
||||
import * as upgrade from '@angular/upgrade';
|
||||
import * as upgradeStatic from '@angular/upgrade/static';
|
||||
import * as upgradeTesting from '@angular/upgrade/static/testing';
|
||||
|
||||
export default {
|
||||
animations,
|
||||
animationsBrowser,
|
||||
animationsBrowserTesting,
|
||||
common,
|
||||
commonTesting,
|
||||
commonHttp,
|
||||
commonHttpTesting,
|
||||
compiler,
|
||||
compilerTesting,
|
||||
core,
|
||||
coreTesting,
|
||||
elements,
|
||||
forms,
|
||||
// See above
|
||||
// http,
|
||||
// httpTesting,
|
||||
platformBrowser,
|
||||
platformBrowserTesting,
|
||||
platformBrowserDynamic,
|
||||
platformBrowserDynamicTesting,
|
||||
platformBrowserAnimations,
|
||||
platformServer,
|
||||
platformServerTesting,
|
||||
platformWebworker,
|
||||
platformWebworkerDynamic,
|
||||
router,
|
||||
routerTesting,
|
||||
routerUpgrade,
|
||||
serviceWorker,
|
||||
upgrade,
|
||||
upgradeStatic,
|
||||
upgradeTesting,
|
||||
};
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "angular-integration",
|
||||
"description": "Assert that users with TypeScript 3.7 can type-check an Angular application",
|
||||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/animations": "file:../../dist/packages-dist/animations",
|
||||
"@angular/common": "file:../../dist/packages-dist/common",
|
||||
"@angular/compiler": "file:../../dist/packages-dist/compiler",
|
||||
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
|
||||
"@angular/core": "file:../../dist/packages-dist/core",
|
||||
"@angular/elements": "file:../../dist/packages-dist/elements",
|
||||
"@angular/forms": "file:../../dist/packages-dist/forms",
|
||||
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
|
||||
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
|
||||
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
|
||||
"@angular/platform-webworker": "file:../../dist/packages-dist/platform-webworker",
|
||||
"@angular/platform-webworker-dynamic": "file:../../dist/packages-dist/platform-webworker-dynamic",
|
||||
"@angular/router": "file:../../dist/packages-dist/router",
|
||||
"@angular/service-worker": "file:../../dist/packages-dist/service-worker",
|
||||
"@angular/upgrade": "file:../../dist/packages-dist/upgrade",
|
||||
"@types/jasmine": "2.5.41",
|
||||
"rxjs": "file:../../node_modules/rxjs",
|
||||
"typescript": "3.7.3",
|
||||
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tsc"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../dist/typings_test_ts37/",
|
||||
"rootDir": ".",
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"es5",
|
||||
"dom",
|
||||
"es2015.collection",
|
||||
"es2015.iterable",
|
||||
"es2015.promise"
|
||||
],
|
||||
"types": [],
|
||||
"strictNullChecks": true
|
||||
},
|
||||
"files": [
|
||||
"include-all.ts",
|
||||
"node_modules/@types/jasmine/index.d.ts"
|
||||
]
|
||||
}
|
|
@ -123,7 +123,7 @@
|
|||
"tsickle": "0.37.1",
|
||||
"tslib": "^1.10.0",
|
||||
"tslint": "5.7.0",
|
||||
"typescript": "~3.6.4",
|
||||
"typescript": "~3.7.4",
|
||||
"xhr2": "0.1.4",
|
||||
"yargs": "13.1.0"
|
||||
},
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
|
||||
"@bazel/typescript": "0.*",
|
||||
"terser": "^4.3.1",
|
||||
"typescript": ">=3.6 <3.7",
|
||||
"typescript": ">=3.6 <3.8",
|
||||
"rollup": ">=1.20.0",
|
||||
"rollup-plugin-commonjs": ">=9.0.0",
|
||||
"rollup-plugin-node-resolve": ">=4.2.0",
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"peerDependencies": {
|
||||
"@angular/compiler": "0.0.0-PLACEHOLDER",
|
||||
"tslib": "^1.10.0",
|
||||
"typescript": ">=3.6 <3.7"
|
||||
"typescript": ">=3.6 <3.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0"
|
||||
|
|
|
@ -19,7 +19,7 @@ const MIN_TS_VERSION = '3.6.4';
|
|||
* ∀ supported typescript version v, v < MAX_TS_VERSION
|
||||
* MAX_TS_VERSION is not considered as a supported TypeScript version
|
||||
*/
|
||||
const MAX_TS_VERSION = '3.7.0';
|
||||
const MAX_TS_VERSION = '3.8.0';
|
||||
|
||||
/**
|
||||
* The currently used version of TypeScript, which can be adjusted for testing purposes using
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import {Type} from '../interface/type';
|
||||
import {TypeDecorator, makeDecorator} from '../util/decorators';
|
||||
|
||||
import {InjectableType, getInjectableDef, ɵɵInjectableDef, ɵɵdefineInjectable} from './interface/defs';
|
||||
import {InjectableType, getInjectableDef, ɵɵdefineInjectable} from './interface/defs';
|
||||
import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';
|
||||
import {compileInjectable as render3CompileInjectable} from './jit/injectable';
|
||||
import {convertInjectableProviderToFactory} from './util';
|
||||
|
|
|
@ -157,8 +157,8 @@ class TypeScriptSymbolQuery implements SymbolQuery {
|
|||
const context: TypeContext = {node: this.source, program: this.program, checker: this.checker};
|
||||
const typeSymbol = findClassSymbolInContext(type, context);
|
||||
if (typeSymbol) {
|
||||
const contextType = this.getTemplateRefContextType(typeSymbol);
|
||||
if (contextType) return new SymbolWrapper(contextType, context).members();
|
||||
const contextType = this.getTemplateRefContextType(typeSymbol, context);
|
||||
if (contextType) return contextType.members();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ class TypeScriptSymbolQuery implements SymbolQuery {
|
|||
return spanAt(this.source, line, column);
|
||||
}
|
||||
|
||||
private getTemplateRefContextType(typeSymbol: ts.Symbol): ts.Symbol|undefined {
|
||||
private getTemplateRefContextType(typeSymbol: ts.Symbol, context: TypeContext): Symbol|undefined {
|
||||
const type = this.checker.getTypeOfSymbolAtLocation(typeSymbol, this.source);
|
||||
const constructor = type.symbol && type.symbol.members &&
|
||||
getFromSymbolTable(type.symbol.members !, '__constructor');
|
||||
|
@ -196,9 +196,10 @@ class TypeScriptSymbolQuery implements SymbolQuery {
|
|||
for (const parameter of constructorDeclaration.parameters) {
|
||||
const type = this.checker.getTypeAtLocation(parameter.type !);
|
||||
if (type.symbol !.name == 'TemplateRef' && isReferenceType(type)) {
|
||||
const typeReference = type as ts.TypeReference;
|
||||
if (typeReference.typeArguments && typeReference.typeArguments.length === 1) {
|
||||
return typeReference.typeArguments[0].symbol;
|
||||
const typeWrapper = new TypeWrapper(type, context);
|
||||
const typeArguments = typeWrapper.typeArguments();
|
||||
if (typeArguments && typeArguments.length === 1) {
|
||||
return typeArguments[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -313,8 +314,15 @@ class TypeWrapper implements Symbol {
|
|||
}
|
||||
|
||||
typeArguments(): Symbol[]|undefined {
|
||||
// TODO: use checker.getTypeArguments when TS 3.7 lands in the monorepo.
|
||||
const typeArguments: ReadonlyArray<ts.Type> = (this.tsType as any).typeArguments;
|
||||
if (!isReferenceType(this.tsType)) return;
|
||||
|
||||
const typeReference = (this.tsType as ts.TypeReference);
|
||||
let typeArguments: ReadonlyArray<ts.Type>|undefined;
|
||||
if (this.context.checker.getTypeArguments) {
|
||||
typeArguments = this.context.checker.getTypeArguments(typeReference);
|
||||
} else {
|
||||
typeArguments = typeReference.typeArguments;
|
||||
}
|
||||
if (!typeArguments) return undefined;
|
||||
return typeArguments.map(ta => new TypeWrapper(ta, this.context));
|
||||
}
|
||||
|
|
|
@ -32,4 +32,4 @@ export const INITIAL_CONFIG = new InjectionToken<PlatformConfig>('Server.INITIAL
|
|||
* @publicApi
|
||||
*/
|
||||
export const BEFORE_APP_SERIALIZED =
|
||||
new InjectionToken<Array<() => void>>('Server.RENDER_MODULE_HOOK');
|
||||
new InjectionToken<Array<() => void | Promise<void>>>('Server.RENDER_MODULE_HOOK');
|
||||
|
|
|
@ -150,7 +150,7 @@ describe(
|
|||
|
||||
it('cancel fetch should invoke onCancelTask',
|
||||
ifEnvSupportsWithDone('AbortController', (done: DoneFn) => {
|
||||
if (isSafari) {
|
||||
if (isSafari()) {
|
||||
// safari not work with AbortController
|
||||
done();
|
||||
return;
|
||||
|
@ -177,7 +177,7 @@ describe(
|
|||
|
||||
it('cancel fetchTask should trigger abort',
|
||||
ifEnvSupportsWithDone('AbortController', (done: DoneFn) => {
|
||||
if (isSafari) {
|
||||
if (isSafari()) {
|
||||
// safari not work with AbortController
|
||||
done();
|
||||
return;
|
||||
|
|
|
@ -188,10 +188,10 @@ export declare class LowerCasePipe implements PipeTransform {
|
|||
}
|
||||
|
||||
export declare class NgClass extends NgClassBase implements DoCheck {
|
||||
klass: string;
|
||||
ngClass: string | string[] | Set<string> | {
|
||||
set klass(value: string);
|
||||
set ngClass(value: string | string[] | Set<string> | {
|
||||
[klass: string]: any;
|
||||
};
|
||||
});
|
||||
constructor(delegate: NgClassImpl);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
@ -217,9 +217,10 @@ export declare class NgComponentOutlet implements OnChanges, OnDestroy {
|
|||
}
|
||||
|
||||
export declare class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
|
||||
ngForOf: (U & NgIterable<T>) | undefined | null;
|
||||
ngForTemplate: TemplateRef<NgForOfContext<T, U>>;
|
||||
ngForTrackBy: TrackByFunction<T>;
|
||||
set ngForOf(ngForOf: (U & NgIterable<T>) | undefined | null);
|
||||
set ngForTemplate(value: TemplateRef<NgForOfContext<T, U>>);
|
||||
get ngForTrackBy(): TrackByFunction<T>;
|
||||
set ngForTrackBy(fn: TrackByFunction<T>);
|
||||
constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfContext<T, U>>, _differs: IterableDiffers);
|
||||
ngDoCheck(): void;
|
||||
static ngTemplateContextGuard<T, U extends NgIterable<T>>(dir: NgForOf<T, U>, ctx: any): ctx is NgForOfContext<T, U>;
|
||||
|
@ -228,19 +229,19 @@ export declare class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> impleme
|
|||
export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
|
||||
$implicit: T;
|
||||
count: number;
|
||||
readonly even: boolean;
|
||||
readonly first: boolean;
|
||||
get even(): boolean;
|
||||
get first(): boolean;
|
||||
index: number;
|
||||
readonly last: boolean;
|
||||
get last(): boolean;
|
||||
ngForOf: U;
|
||||
readonly odd: boolean;
|
||||
get odd(): boolean;
|
||||
constructor($implicit: T, ngForOf: U, index: number, count: number);
|
||||
}
|
||||
|
||||
export declare class NgIf<T = unknown> {
|
||||
ngIf: T;
|
||||
ngIfElse: TemplateRef<NgIfContext<T>> | null;
|
||||
ngIfThen: TemplateRef<NgIfContext<T>> | null;
|
||||
set ngIf(condition: T);
|
||||
set ngIfElse(templateRef: TemplateRef<NgIfContext<T>> | null);
|
||||
set ngIfThen(templateRef: TemplateRef<NgIfContext<T>> | null);
|
||||
constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext<T>>);
|
||||
static ngTemplateGuard_ngIf: 'binding';
|
||||
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): ctx is NgIfContext<T>;
|
||||
|
@ -262,7 +263,7 @@ export declare abstract class NgLocalization {
|
|||
}
|
||||
|
||||
export declare class NgPlural {
|
||||
ngPlural: number;
|
||||
set ngPlural(value: number);
|
||||
constructor(_localization: NgLocalization);
|
||||
addCase(value: string, switchView: SwitchView): void;
|
||||
}
|
||||
|
@ -273,9 +274,9 @@ export declare class NgPluralCase {
|
|||
}
|
||||
|
||||
export declare class NgStyle extends NgStyleBase implements DoCheck {
|
||||
ngStyle: {
|
||||
set ngStyle(value: {
|
||||
[klass: string]: any;
|
||||
} | null;
|
||||
} | null);
|
||||
constructor(delegate: NgStyleImpl);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
@ -291,7 +292,7 @@ export declare class NgStyleBase {
|
|||
}
|
||||
|
||||
export declare class NgSwitch {
|
||||
ngSwitch: any;
|
||||
set ngSwitch(newValue: any);
|
||||
}
|
||||
|
||||
export declare class NgSwitchCase implements DoCheck {
|
||||
|
@ -353,13 +354,13 @@ export declare class PercentPipe implements PipeTransform {
|
|||
}
|
||||
|
||||
export declare abstract class PlatformLocation {
|
||||
abstract readonly hash: string;
|
||||
abstract readonly hostname: string;
|
||||
abstract readonly href: string;
|
||||
abstract readonly pathname: string;
|
||||
abstract readonly port: string;
|
||||
abstract readonly protocol: string;
|
||||
abstract readonly search: string;
|
||||
abstract get hash(): string;
|
||||
abstract get hostname(): string;
|
||||
abstract get href(): string;
|
||||
abstract get pathname(): string;
|
||||
abstract get port(): string;
|
||||
abstract get protocol(): string;
|
||||
abstract get search(): string;
|
||||
abstract back(): void;
|
||||
abstract forward(): void;
|
||||
abstract getBaseHrefFromDOM(): string;
|
||||
|
|
|
@ -22,7 +22,7 @@ export interface RequestMatch {
|
|||
}
|
||||
|
||||
export declare class TestRequest {
|
||||
readonly cancelled: boolean;
|
||||
get cancelled(): boolean;
|
||||
request: HttpRequest<any>;
|
||||
constructor(request: HttpRequest<any>, observer: Observer<HttpEvent<any>>);
|
||||
error(error: ErrorEvent, opts?: {
|
||||
|
|
|
@ -19,15 +19,15 @@ export declare class MockLocationStrategy extends LocationStrategy {
|
|||
}
|
||||
|
||||
export declare class MockPlatformLocation implements PlatformLocation {
|
||||
readonly hash: string;
|
||||
readonly hostname: string;
|
||||
readonly href: string;
|
||||
readonly pathname: string;
|
||||
readonly port: string;
|
||||
readonly protocol: string;
|
||||
readonly search: string;
|
||||
readonly state: unknown;
|
||||
readonly url: string;
|
||||
get hash(): string;
|
||||
get hostname(): string;
|
||||
get href(): string;
|
||||
get pathname(): string;
|
||||
get port(): string;
|
||||
get protocol(): string;
|
||||
get search(): string;
|
||||
get state(): unknown;
|
||||
get url(): string;
|
||||
constructor(config?: MockPlatformLocationConfig);
|
||||
back(): void;
|
||||
forward(): void;
|
||||
|
|
|
@ -41,7 +41,7 @@ export declare class ApplicationRef {
|
|||
readonly componentTypes: Type<any>[];
|
||||
readonly components: ComponentRef<any>[];
|
||||
readonly isStable: Observable<boolean>;
|
||||
readonly viewCount: number;
|
||||
get viewCount(): number;
|
||||
attachView(viewRef: ViewRef): void;
|
||||
bootstrap<C>(componentOrFactory: ComponentFactory<C> | Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
|
||||
detachView(viewRef: ViewRef): void;
|
||||
|
@ -136,17 +136,17 @@ export interface ComponentDecorator {
|
|||
}
|
||||
|
||||
export declare abstract class ComponentFactory<C> {
|
||||
abstract readonly componentType: Type<any>;
|
||||
abstract readonly inputs: {
|
||||
abstract get componentType(): Type<any>;
|
||||
abstract get inputs(): {
|
||||
propName: string;
|
||||
templateName: string;
|
||||
}[];
|
||||
abstract readonly ngContentSelectors: string[];
|
||||
abstract readonly outputs: {
|
||||
abstract get ngContentSelectors(): string[];
|
||||
abstract get outputs(): {
|
||||
propName: string;
|
||||
templateName: string;
|
||||
}[];
|
||||
abstract readonly selector: string;
|
||||
abstract get selector(): string;
|
||||
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
||||
}
|
||||
|
||||
|
@ -156,12 +156,12 @@ export declare abstract class ComponentFactoryResolver {
|
|||
}
|
||||
|
||||
export declare abstract class ComponentRef<C> {
|
||||
abstract readonly changeDetectorRef: ChangeDetectorRef;
|
||||
abstract readonly componentType: Type<any>;
|
||||
abstract readonly hostView: ViewRef;
|
||||
abstract readonly injector: Injector;
|
||||
abstract readonly instance: C;
|
||||
abstract readonly location: ElementRef;
|
||||
abstract get changeDetectorRef(): ChangeDetectorRef;
|
||||
abstract get componentType(): Type<any>;
|
||||
abstract get hostView(): ViewRef;
|
||||
abstract get injector(): Injector;
|
||||
abstract get instance(): C;
|
||||
abstract get location(): ElementRef;
|
||||
abstract destroy(): void;
|
||||
abstract onDestroy(callback: Function): void;
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ export declare const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
|
|||
/** @deprecated */
|
||||
export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
|
||||
readonly collection: V[] | Iterable<V> | null;
|
||||
readonly isDirty: boolean;
|
||||
get isDirty(): boolean;
|
||||
readonly length: number;
|
||||
constructor(trackByFn?: TrackByFunction<V>);
|
||||
check(collection: NgIterable<V>): boolean;
|
||||
|
@ -318,8 +318,8 @@ export declare class ElementRef<T extends any = any> {
|
|||
}
|
||||
|
||||
export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
||||
abstract readonly context: C;
|
||||
abstract readonly rootNodes: any[];
|
||||
abstract get context(): C;
|
||||
abstract get rootNodes(): any[];
|
||||
}
|
||||
|
||||
export declare function enableProdMode(): void;
|
||||
|
@ -601,7 +601,7 @@ export interface NgModuleDecorator {
|
|||
}
|
||||
|
||||
export declare abstract class NgModuleFactory<T> {
|
||||
abstract readonly moduleType: Type<T>;
|
||||
abstract get moduleType(): Type<T>;
|
||||
abstract create(parentInjector: Injector | null): NgModuleRef<T>;
|
||||
}
|
||||
|
||||
|
@ -611,9 +611,9 @@ export declare abstract class NgModuleFactoryLoader {
|
|||
}
|
||||
|
||||
export declare abstract class NgModuleRef<T> {
|
||||
abstract readonly componentFactoryResolver: ComponentFactoryResolver;
|
||||
abstract readonly injector: Injector;
|
||||
abstract readonly instance: T;
|
||||
abstract get componentFactoryResolver(): ComponentFactoryResolver;
|
||||
abstract get injector(): Injector;
|
||||
abstract get instance(): T;
|
||||
abstract destroy(): void;
|
||||
abstract onDestroy(callback: () => void): void;
|
||||
}
|
||||
|
@ -780,7 +780,7 @@ export declare function ɵɵdefineComponent<T>(componentDefinition: {
|
|||
|
||||
export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
|
||||
type: Type<T>;
|
||||
selectors?: (string | SelectorFlags)[][] | undefined;
|
||||
selectors?: CssSelectorList | undefined;
|
||||
inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
|
||||
outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
|
||||
features?: DirectiveDefFeature[] | undefined;
|
||||
|
@ -1114,8 +1114,8 @@ export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
|
|||
export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
||||
|
||||
export declare class PlatformRef {
|
||||
readonly destroyed: boolean;
|
||||
readonly injector: Injector;
|
||||
get destroyed(): boolean;
|
||||
get injector(): Injector;
|
||||
bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
|
||||
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
|
||||
destroy(): void;
|
||||
|
@ -1164,7 +1164,7 @@ export declare class QueryList<T> implements Iterable<T> {
|
|||
|
||||
/** @deprecated */
|
||||
export declare abstract class ReflectiveInjector implements Injector {
|
||||
abstract readonly parent: Injector | null;
|
||||
abstract get parent(): Injector | null;
|
||||
abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
||||
abstract get(token: any, notFoundValue?: any): any;
|
||||
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
||||
|
@ -1181,12 +1181,12 @@ export declare class ReflectiveKey {
|
|||
id: number;
|
||||
token: Object;
|
||||
constructor(token: Object, id: number);
|
||||
static readonly numberOfKeys: number;
|
||||
static get numberOfKeys(): number;
|
||||
static get(token: Object): ReflectiveKey;
|
||||
}
|
||||
|
||||
export declare abstract class Renderer2 {
|
||||
abstract readonly data: {
|
||||
abstract get data(): {
|
||||
[key: string]: any;
|
||||
};
|
||||
destroyNode: ((node: any) => void) | null;
|
||||
|
@ -1325,7 +1325,7 @@ export declare abstract class SystemJsNgModuleLoaderConfig {
|
|||
}
|
||||
|
||||
export declare abstract class TemplateRef<C> {
|
||||
abstract readonly elementRef: ElementRef;
|
||||
abstract get elementRef(): ElementRef;
|
||||
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
||||
}
|
||||
|
||||
|
@ -1412,10 +1412,10 @@ export interface ViewChildrenDecorator {
|
|||
}
|
||||
|
||||
export declare abstract class ViewContainerRef {
|
||||
abstract readonly element: ElementRef;
|
||||
abstract readonly injector: Injector;
|
||||
abstract readonly length: number;
|
||||
/** @deprecated */ abstract readonly parentInjector: Injector;
|
||||
abstract get element(): ElementRef;
|
||||
abstract get injector(): Injector;
|
||||
abstract get length(): number;
|
||||
/** @deprecated */ abstract get parentInjector(): Injector;
|
||||
abstract clear(): void;
|
||||
abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
||||
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
|
||||
|
@ -1435,7 +1435,7 @@ export declare enum ViewEncapsulation {
|
|||
}
|
||||
|
||||
export declare abstract class ViewRef extends ChangeDetectorRef {
|
||||
abstract readonly destroyed: boolean;
|
||||
abstract get destroyed(): boolean;
|
||||
abstract destroy(): void;
|
||||
abstract onDestroy(callback: Function): any /** TODO #9100 */;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
export declare abstract class AbstractControl {
|
||||
asyncValidator: AsyncValidatorFn | null;
|
||||
readonly dirty: boolean;
|
||||
readonly disabled: boolean;
|
||||
readonly enabled: boolean;
|
||||
get dirty(): boolean;
|
||||
get disabled(): boolean;
|
||||
get enabled(): boolean;
|
||||
readonly errors: ValidationErrors | null;
|
||||
readonly invalid: boolean;
|
||||
readonly parent: FormGroup | FormArray;
|
||||
readonly pending: boolean;
|
||||
get invalid(): boolean;
|
||||
get parent(): FormGroup | FormArray;
|
||||
get pending(): boolean;
|
||||
readonly pristine: boolean;
|
||||
readonly root: AbstractControl;
|
||||
get root(): AbstractControl;
|
||||
readonly status: string;
|
||||
readonly statusChanges: Observable<any>;
|
||||
readonly touched: boolean;
|
||||
readonly untouched: boolean;
|
||||
readonly updateOn: FormHooks;
|
||||
readonly valid: boolean;
|
||||
get untouched(): boolean;
|
||||
get updateOn(): FormHooks;
|
||||
get valid(): boolean;
|
||||
validator: ValidatorFn | null;
|
||||
readonly value: any;
|
||||
readonly valueChanges: Observable<any>;
|
||||
|
@ -65,22 +65,22 @@ export declare abstract class AbstractControl {
|
|||
}
|
||||
|
||||
export declare abstract class AbstractControlDirective {
|
||||
abstract readonly control: AbstractControl | null;
|
||||
readonly dirty: boolean | null;
|
||||
readonly disabled: boolean | null;
|
||||
readonly enabled: boolean | null;
|
||||
readonly errors: ValidationErrors | null;
|
||||
readonly invalid: boolean | null;
|
||||
readonly path: string[] | null;
|
||||
readonly pending: boolean | null;
|
||||
readonly pristine: boolean | null;
|
||||
readonly status: string | null;
|
||||
readonly statusChanges: Observable<any> | null;
|
||||
readonly touched: boolean | null;
|
||||
readonly untouched: boolean | null;
|
||||
readonly valid: boolean | null;
|
||||
readonly value: any;
|
||||
readonly valueChanges: Observable<any> | null;
|
||||
abstract get control(): AbstractControl | null;
|
||||
get dirty(): boolean | null;
|
||||
get disabled(): boolean | null;
|
||||
get enabled(): boolean | null;
|
||||
get errors(): ValidationErrors | null;
|
||||
get invalid(): boolean | null;
|
||||
get path(): string[] | null;
|
||||
get pending(): boolean | null;
|
||||
get pristine(): boolean | null;
|
||||
get status(): string | null;
|
||||
get statusChanges(): Observable<any> | null;
|
||||
get touched(): boolean | null;
|
||||
get untouched(): boolean | null;
|
||||
get valid(): boolean | null;
|
||||
get value(): any;
|
||||
get valueChanges(): Observable<any> | null;
|
||||
getError(errorCode: string, path?: Array<string | number> | string): any;
|
||||
hasError(errorCode: string, path?: Array<string | number> | string): boolean;
|
||||
reset(value?: any): void;
|
||||
|
@ -93,11 +93,11 @@ export interface AbstractControlOptions {
|
|||
}
|
||||
|
||||
export declare class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
readonly control: FormGroup;
|
||||
readonly formDirective: Form | null;
|
||||
readonly path: string[];
|
||||
readonly validator: ValidatorFn | null;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormGroup;
|
||||
get formDirective(): Form | null;
|
||||
get path(): string[];
|
||||
get validator(): ValidatorFn | null;
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
}
|
||||
|
@ -127,9 +127,9 @@ export declare class CheckboxRequiredValidator extends RequiredValidator {
|
|||
export declare const COMPOSITION_BUFFER_MODE: InjectionToken<boolean>;
|
||||
|
||||
export declare abstract class ControlContainer extends AbstractControlDirective {
|
||||
readonly formDirective: Form | null;
|
||||
get formDirective(): Form | null;
|
||||
name: string | number | null;
|
||||
readonly path: string[] | null;
|
||||
get path(): string[] | null;
|
||||
}
|
||||
|
||||
export interface ControlValueAccessor {
|
||||
|
@ -150,7 +150,7 @@ export declare class DefaultValueAccessor implements ControlValueAccessor {
|
|||
}
|
||||
|
||||
export declare class EmailValidator implements Validator {
|
||||
email: boolean | string;
|
||||
set email(value: boolean | string);
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ export interface Form {
|
|||
|
||||
export declare class FormArray extends AbstractControl {
|
||||
controls: AbstractControl[];
|
||||
readonly length: number;
|
||||
get length(): number;
|
||||
constructor(controls: AbstractControl[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
||||
at(index: number): AbstractControl;
|
||||
clear(): void;
|
||||
|
@ -191,12 +191,12 @@ export declare class FormArray extends AbstractControl {
|
|||
}
|
||||
|
||||
export declare class FormArrayName extends ControlContainer implements OnInit, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
readonly control: FormArray;
|
||||
readonly formDirective: FormGroupDirective | null;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormArray;
|
||||
get formDirective(): FormGroupDirective | null;
|
||||
name: string | number | null;
|
||||
readonly path: string[];
|
||||
readonly validator: ValidatorFn | null;
|
||||
get path(): string[];
|
||||
get validator(): ValidatorFn | null;
|
||||
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
|
@ -235,14 +235,14 @@ export declare class FormControl extends AbstractControl {
|
|||
}
|
||||
|
||||
export declare class FormControlDirective extends NgControl implements OnChanges {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
readonly control: FormControl;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormControl;
|
||||
form: FormControl;
|
||||
isDisabled: boolean;
|
||||
set isDisabled(isDisabled: boolean);
|
||||
/** @deprecated */ model: any;
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
/** @deprecated */ update: EventEmitter<any>;
|
||||
readonly validator: ValidatorFn | null;
|
||||
get validator(): ValidatorFn | null;
|
||||
viewModel: any;
|
||||
constructor(validators: Array<Validator | ValidatorFn>, asyncValidators: Array<AsyncValidator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
|
@ -250,15 +250,15 @@ export declare class FormControlDirective extends NgControl implements OnChanges
|
|||
}
|
||||
|
||||
export declare class FormControlName extends NgControl implements OnChanges, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn;
|
||||
get asyncValidator(): AsyncValidatorFn;
|
||||
readonly control: FormControl;
|
||||
readonly formDirective: any;
|
||||
isDisabled: boolean;
|
||||
get formDirective(): any;
|
||||
set isDisabled(isDisabled: boolean);
|
||||
/** @deprecated */ model: any;
|
||||
name: string | number | null;
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
/** @deprecated */ update: EventEmitter<any>;
|
||||
readonly validator: ValidatorFn | null;
|
||||
get validator(): ValidatorFn | null;
|
||||
constructor(parent: ControlContainer, validators: Array<Validator | ValidatorFn>, asyncValidators: Array<AsyncValidator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
ngOnDestroy(): void;
|
||||
|
@ -297,12 +297,12 @@ export declare class FormGroup extends AbstractControl {
|
|||
}
|
||||
|
||||
export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges {
|
||||
readonly control: FormGroup;
|
||||
get control(): FormGroup;
|
||||
directives: FormControlName[];
|
||||
form: FormGroup;
|
||||
readonly formDirective: Form;
|
||||
get formDirective(): Form;
|
||||
ngSubmit: EventEmitter<any>;
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
readonly submitted: boolean;
|
||||
constructor(_validators: any[], _asyncValidators: any[]);
|
||||
addControl(dir: FormControlName): FormControl;
|
||||
|
@ -350,9 +350,9 @@ export declare const NG_VALIDATORS: InjectionToken<(Function | Validator)[]>;
|
|||
export declare const NG_VALUE_ACCESSOR: InjectionToken<ControlValueAccessor>;
|
||||
|
||||
export declare abstract class NgControl extends AbstractControlDirective {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
name: string | number | null;
|
||||
readonly validator: ValidatorFn | null;
|
||||
get validator(): ValidatorFn | null;
|
||||
valueAccessor: ControlValueAccessor | null;
|
||||
abstract viewToModelUpdate(newValue: any): void;
|
||||
}
|
||||
|
@ -366,17 +366,17 @@ export declare class NgControlStatusGroup extends AbstractControlStatus {
|
|||
}
|
||||
|
||||
export declare class NgForm extends ControlContainer implements Form, AfterViewInit {
|
||||
readonly control: FormGroup;
|
||||
readonly controls: {
|
||||
get control(): FormGroup;
|
||||
get controls(): {
|
||||
[key: string]: AbstractControl;
|
||||
};
|
||||
form: FormGroup;
|
||||
readonly formDirective: Form;
|
||||
get formDirective(): Form;
|
||||
ngSubmit: EventEmitter<any>;
|
||||
options: {
|
||||
updateOn?: FormHooks;
|
||||
};
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
readonly submitted: boolean;
|
||||
constructor(validators: any[], asyncValidators: any[]);
|
||||
addControl(dir: NgModel): void;
|
||||
|
@ -396,9 +396,9 @@ export declare class NgForm extends ControlContainer implements Form, AfterViewI
|
|||
}
|
||||
|
||||
export declare class NgModel extends NgControl implements OnChanges, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
readonly control: FormControl;
|
||||
readonly formDirective: any;
|
||||
get formDirective(): any;
|
||||
isDisabled: boolean;
|
||||
model: any;
|
||||
name: string;
|
||||
|
@ -407,9 +407,9 @@ export declare class NgModel extends NgControl implements OnChanges, OnDestroy {
|
|||
standalone?: boolean;
|
||||
updateOn?: FormHooks;
|
||||
};
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
update: EventEmitter<any>;
|
||||
readonly validator: ValidatorFn | null;
|
||||
get validator(): ValidatorFn | null;
|
||||
viewModel: any;
|
||||
constructor(parent: ControlContainer, validators: Array<Validator | ValidatorFn>, asyncValidators: Array<AsyncValidator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[]);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
|
@ -425,8 +425,8 @@ export declare class NgModelGroup extends AbstractFormGroupDirective implements
|
|||
|
||||
export declare class NgSelectOption implements OnDestroy {
|
||||
id: string;
|
||||
ngValue: any;
|
||||
value: any;
|
||||
set ngValue(value: any);
|
||||
set value(value: any);
|
||||
constructor(_element: ElementRef, _renderer: Renderer2, _select: SelectControlValueAccessor);
|
||||
ngOnDestroy(): void;
|
||||
}
|
||||
|
@ -480,13 +480,14 @@ export declare class ReactiveFormsModule {
|
|||
}
|
||||
|
||||
export declare class RequiredValidator implements Validator {
|
||||
required: boolean | string;
|
||||
get required(): boolean | string;
|
||||
set required(value: boolean | string);
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare class SelectControlValueAccessor implements ControlValueAccessor {
|
||||
compareWith: (o1: any, o2: any) => boolean;
|
||||
set compareWith(fn: (o1: any, o2: any) => boolean);
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
value: any;
|
||||
|
@ -498,7 +499,7 @@ export declare class SelectControlValueAccessor implements ControlValueAccessor
|
|||
}
|
||||
|
||||
export declare class SelectMultipleControlValueAccessor implements ControlValueAccessor {
|
||||
compareWith: (o1: any, o2: any) => boolean;
|
||||
set compareWith(fn: (o1: any, o2: any) => boolean);
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
value: any;
|
||||
|
|
|
@ -142,7 +142,8 @@ export declare class RequestOptions {
|
|||
method: RequestMethod | string | null;
|
||||
params: URLSearchParams;
|
||||
responseType: ResponseContentType | null;
|
||||
/** @deprecated */ search: URLSearchParams;
|
||||
/** @deprecated */ set search(params: URLSearchParams);
|
||||
/** @deprecated */ get search(): URLSearchParams;
|
||||
url: string | null;
|
||||
withCredentials: boolean | null;
|
||||
constructor(opts?: RequestOptionsArgs);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void)[]>;
|
||||
export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void | Promise<void>)[]>;
|
||||
|
||||
export declare const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
|
||||
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
export declare class ActivatedRoute {
|
||||
readonly children: ActivatedRoute[];
|
||||
get children(): ActivatedRoute[];
|
||||
component: Type<any> | string | null;
|
||||
data: Observable<Data>;
|
||||
readonly firstChild: ActivatedRoute | null;
|
||||
get firstChild(): ActivatedRoute | null;
|
||||
fragment: Observable<string>;
|
||||
outlet: string;
|
||||
readonly paramMap: Observable<ParamMap>;
|
||||
get paramMap(): Observable<ParamMap>;
|
||||
params: Observable<Params>;
|
||||
readonly parent: ActivatedRoute | null;
|
||||
readonly pathFromRoot: ActivatedRoute[];
|
||||
readonly queryParamMap: Observable<ParamMap>;
|
||||
get parent(): ActivatedRoute | null;
|
||||
get pathFromRoot(): ActivatedRoute[];
|
||||
get queryParamMap(): Observable<ParamMap>;
|
||||
queryParams: Observable<Params>;
|
||||
readonly root: ActivatedRoute;
|
||||
readonly routeConfig: Route | null;
|
||||
get root(): ActivatedRoute;
|
||||
get routeConfig(): Route | null;
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
url: Observable<UrlSegment[]>;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class ActivatedRouteSnapshot {
|
||||
readonly children: ActivatedRouteSnapshot[];
|
||||
get children(): ActivatedRouteSnapshot[];
|
||||
component: Type<any> | string | null;
|
||||
data: Data;
|
||||
readonly firstChild: ActivatedRouteSnapshot | null;
|
||||
get firstChild(): ActivatedRouteSnapshot | null;
|
||||
fragment: string;
|
||||
outlet: string;
|
||||
readonly paramMap: ParamMap;
|
||||
get paramMap(): ParamMap;
|
||||
params: Params;
|
||||
readonly parent: ActivatedRouteSnapshot | null;
|
||||
readonly pathFromRoot: ActivatedRouteSnapshot[];
|
||||
readonly queryParamMap: ParamMap;
|
||||
get parent(): ActivatedRouteSnapshot | null;
|
||||
get pathFromRoot(): ActivatedRouteSnapshot[];
|
||||
get queryParamMap(): ParamMap;
|
||||
queryParams: Params;
|
||||
readonly root: ActivatedRouteSnapshot;
|
||||
get root(): ActivatedRouteSnapshot;
|
||||
readonly routeConfig: Route | null;
|
||||
url: UrlSegment[];
|
||||
toString(): string;
|
||||
|
@ -333,7 +333,7 @@ export declare class Router {
|
|||
relativeLinkResolution: 'legacy' | 'corrected';
|
||||
routeReuseStrategy: RouteReuseStrategy;
|
||||
readonly routerState: RouterState;
|
||||
readonly url: string;
|
||||
get url(): string;
|
||||
urlHandlingStrategy: UrlHandlingStrategy;
|
||||
urlUpdateStrategy: 'deferred' | 'eager';
|
||||
constructor(rootComponentType: Type<any> | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes);
|
||||
|
@ -374,18 +374,18 @@ export declare class RouterEvent {
|
|||
export declare class RouterLink {
|
||||
fragment: string;
|
||||
preserveFragment: boolean;
|
||||
/** @deprecated */ preserveQueryParams: boolean;
|
||||
/** @deprecated */ set preserveQueryParams(value: boolean);
|
||||
queryParams: {
|
||||
[k: string]: any;
|
||||
};
|
||||
queryParamsHandling: QueryParamsHandling;
|
||||
replaceUrl: boolean;
|
||||
routerLink: any[] | string;
|
||||
set routerLink(commands: any[] | string);
|
||||
skipLocationChange: boolean;
|
||||
state?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
readonly urlTree: UrlTree;
|
||||
get urlTree(): UrlTree;
|
||||
constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer2, el: ElementRef);
|
||||
onClick(): boolean;
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterCont
|
|||
readonly isActive: boolean;
|
||||
links: QueryList<RouterLink>;
|
||||
linksWithHrefs: QueryList<RouterLinkWithHref>;
|
||||
routerLinkActive: string[] | string;
|
||||
set routerLinkActive(data: string[] | string);
|
||||
routerLinkActiveOptions: {
|
||||
exact: boolean;
|
||||
};
|
||||
|
@ -408,19 +408,19 @@ export declare class RouterLinkWithHref implements OnChanges, OnDestroy {
|
|||
fragment: string;
|
||||
href: string;
|
||||
preserveFragment: boolean;
|
||||
preserveQueryParams: boolean;
|
||||
set preserveQueryParams(value: boolean);
|
||||
queryParams: {
|
||||
[k: string]: any;
|
||||
};
|
||||
queryParamsHandling: QueryParamsHandling;
|
||||
replaceUrl: boolean;
|
||||
routerLink: any[] | string;
|
||||
set routerLink(commands: any[] | string);
|
||||
skipLocationChange: boolean;
|
||||
state?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
target: string;
|
||||
readonly urlTree: UrlTree;
|
||||
get urlTree(): UrlTree;
|
||||
constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy);
|
||||
ngOnChanges(changes: {}): any;
|
||||
ngOnDestroy(): any;
|
||||
|
@ -435,11 +435,11 @@ export declare class RouterModule {
|
|||
|
||||
export declare class RouterOutlet implements OnDestroy, OnInit {
|
||||
activateEvents: EventEmitter<any>;
|
||||
readonly activatedRoute: ActivatedRoute;
|
||||
readonly activatedRouteData: Data;
|
||||
readonly component: Object;
|
||||
get activatedRoute(): ActivatedRoute;
|
||||
get activatedRouteData(): Data;
|
||||
get component(): Object;
|
||||
deactivateEvents: EventEmitter<any>;
|
||||
readonly isActivated: boolean;
|
||||
get isActivated(): boolean;
|
||||
constructor(parentContexts: ChildrenOutletContexts, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string, changeDetector: ChangeDetectorRef);
|
||||
activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void;
|
||||
attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute): void;
|
||||
|
@ -510,7 +510,7 @@ export declare type UrlMatchResult = {
|
|||
};
|
||||
|
||||
export declare class UrlSegment {
|
||||
readonly parameterMap: ParamMap;
|
||||
get parameterMap(): ParamMap;
|
||||
parameters: {
|
||||
[name: string]: string;
|
||||
};
|
||||
|
@ -527,7 +527,7 @@ export declare class UrlSegmentGroup {
|
|||
children: {
|
||||
[key: string]: UrlSegmentGroup;
|
||||
};
|
||||
readonly numberOfChildren: number;
|
||||
get numberOfChildren(): number;
|
||||
parent: UrlSegmentGroup | null;
|
||||
segments: UrlSegment[];
|
||||
constructor(
|
||||
|
@ -546,7 +546,7 @@ export declare abstract class UrlSerializer {
|
|||
|
||||
export declare class UrlTree {
|
||||
fragment: string | null;
|
||||
readonly queryParamMap: ParamMap;
|
||||
get queryParamMap(): ParamMap;
|
||||
queryParams: Params;
|
||||
root: UrlSegmentGroup;
|
||||
toString(): string;
|
||||
|
|
|
@ -6,7 +6,10 @@ export declare function setupTestingRouter(urlSerializer: UrlSerializer, context
|
|||
export declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], urlHandlingStrategy?: UrlHandlingStrategy): Router;
|
||||
|
||||
export declare class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {
|
||||
stubbedModules: {
|
||||
set stubbedModules(modules: {
|
||||
[path: string]: any;
|
||||
});
|
||||
get stubbedModules(): {
|
||||
[path: string]: any;
|
||||
};
|
||||
constructor(compiler: Compiler);
|
||||
|
|
|
@ -3,7 +3,7 @@ export declare class ServiceWorkerModule {
|
|||
}
|
||||
|
||||
export declare class SwPush {
|
||||
readonly isEnabled: boolean;
|
||||
get isEnabled(): boolean;
|
||||
readonly messages: Observable<object>;
|
||||
readonly notificationClicks: Observable<{
|
||||
action: string;
|
||||
|
@ -28,7 +28,7 @@ export declare abstract class SwRegistrationOptions {
|
|||
export declare class SwUpdate {
|
||||
readonly activated: Observable<UpdateActivatedEvent>;
|
||||
readonly available: Observable<UpdateAvailableEvent>;
|
||||
readonly isEnabled: boolean;
|
||||
get isEnabled(): boolean;
|
||||
constructor(sw: NgswCommChannel);
|
||||
activateUpdate(): Promise<void>;
|
||||
checkForUpdate(): Promise<void>;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"test": "test"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "~3.6.4"
|
||||
"typescript": "~3.7.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^2.3.1",
|
||||
|
@ -33,7 +33,7 @@
|
|||
"chai": "^4.1.2",
|
||||
"jasmine": "^3.1.0",
|
||||
"source-map-support": "^0.5.9",
|
||||
"typescript": "~3.6.4"
|
||||
"typescript": "~3.7.4"
|
||||
},
|
||||
"repository": {},
|
||||
"keywords": [
|
||||
|
|
|
@ -13609,7 +13609,7 @@ typescript@3.2.4:
|
|||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.4.tgz#c585cb952912263d915b462726ce244ba510ef3d"
|
||||
integrity sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==
|
||||
|
||||
typescript@3.6.4, typescript@~3.6.4:
|
||||
typescript@3.6.4:
|
||||
version "3.6.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d"
|
||||
integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==
|
||||
|
@ -13619,6 +13619,11 @@ typescript@~3.5.3:
|
|||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
|
||||
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
|
||||
|
||||
typescript@~3.7.4:
|
||||
version "3.7.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.4.tgz#1743a5ec5fef6a1fa9f3e4708e33c81c73876c19"
|
||||
integrity sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==
|
||||
|
||||
uglify-js@1.2.6, uglify-js@~1.2.5:
|
||||
version "1.2.6"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-1.2.6.tgz#d354b2d3c1cf10ebc18fa78c11a28bdd9ce1580d"
|
||||
|
|
Loading…
Reference in New Issue