ci: move public-api goldens to goldens directory (#35768)
Moves the public api .d.ts files from tools/public_api_guard to goldens/public-api. Additionally, provides a README in the goldens directory and a script assist in testing the current state of the repo against the goldens as well as a command for accepting all changes to the goldens in a single command. PR Close #35768
This commit is contained in:
parent
19cfaf7f4c
commit
15f8afa4bf
|
@ -939,6 +939,7 @@ groups:
|
|||
'docs/SAVED_REPLIES.md',
|
||||
'docs/TOOLS.md',
|
||||
'docs/TRIAGE_AND_LABELS.md',
|
||||
'goldens/*',
|
||||
'modules/e2e_util/e2e_util.ts',
|
||||
'modules/e2e_util/perf_util.ts',
|
||||
'modules/*',
|
||||
|
@ -958,8 +959,6 @@ groups:
|
|||
'tools/ngcontainer/**',
|
||||
'tools/npm/**',
|
||||
'tools/npm_integration_test/**',
|
||||
'tools/public_api_guard/BUILD.bazel',
|
||||
'tools/public_api_guard/public_api_guard.bzl',
|
||||
'tools/pullapprove/**',
|
||||
'tools/rxjs/**',
|
||||
'tools/saucelabs/**',
|
||||
|
@ -994,7 +993,7 @@ groups:
|
|||
conditions:
|
||||
- >
|
||||
contains_any_globs(files, [
|
||||
'tools/public_api_guard/**',
|
||||
'goldens/public-api/**',
|
||||
'docs/NAMING.md',
|
||||
'aio/content/guide/glossary.md',
|
||||
'aio/content/guide/styleguide.md',
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
filegroup(
|
||||
name = "public-api",
|
||||
srcs = glob([
|
||||
"public-api/**/*.d.ts",
|
||||
]),
|
||||
)
|
|
@ -0,0 +1,11 @@
|
|||
### *`public-api/`*
|
||||
|
||||
This directory contains all of the public api goldens for our npm packages we publish
|
||||
to NPM. These are tested on all PRs and commits as part of the our bazel tests.
|
||||
|
||||
To check or update the public api goldens, run one of the following commands:
|
||||
|
||||
```bash
|
||||
yarn public-api:check
|
||||
yarn public-api:update
|
||||
```
|
|
@ -14,16 +14,16 @@ export declare type AnimateTimings = {
|
|||
|
||||
export declare function animation(steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationReferenceMetadata;
|
||||
|
||||
export interface AnimationAnimateChildMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationAnimateChildMetadata extends AnimationMetadata {
|
||||
options: AnimationOptions | null;
|
||||
}
|
||||
|
||||
export interface AnimationAnimateMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationAnimateMetadata extends AnimationMetadata {
|
||||
styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null;
|
||||
timings: string | number | AnimateTimings;
|
||||
}
|
||||
|
||||
export interface AnimationAnimateRefMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationAnimateRefMetadata extends AnimationMetadata {
|
||||
animation: AnimationReferenceMetadata;
|
||||
options: AnimationOptions | null;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ export declare abstract class AnimationBuilder {
|
|||
abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;
|
||||
}
|
||||
|
||||
export interface AnimationEvent {
|
||||
export declare interface AnimationEvent {
|
||||
disabled: boolean;
|
||||
element: any;
|
||||
fromState: string;
|
||||
|
@ -46,16 +46,16 @@ export declare abstract class AnimationFactory {
|
|||
abstract create(element: any, options?: AnimationOptions): AnimationPlayer;
|
||||
}
|
||||
|
||||
export interface AnimationGroupMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationGroupMetadata extends AnimationMetadata {
|
||||
options: AnimationOptions | null;
|
||||
steps: AnimationMetadata[];
|
||||
}
|
||||
|
||||
export interface AnimationKeyframesSequenceMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationKeyframesSequenceMetadata extends AnimationMetadata {
|
||||
steps: AnimationStyleMetadata[];
|
||||
}
|
||||
|
||||
export interface AnimationMetadata {
|
||||
export declare interface AnimationMetadata {
|
||||
type: AnimationMetadataType;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ export declare interface AnimationOptions {
|
|||
};
|
||||
}
|
||||
|
||||
export interface AnimationPlayer {
|
||||
export declare interface AnimationPlayer {
|
||||
beforeDestroy?: () => any;
|
||||
parentPlayer: AnimationPlayer | null;
|
||||
readonly totalTime: number;
|
||||
|
@ -101,7 +101,7 @@ export interface AnimationPlayer {
|
|||
setPosition(position: any /** TODO #9100 */): void;
|
||||
}
|
||||
|
||||
export interface AnimationQueryMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationQueryMetadata extends AnimationMetadata {
|
||||
animation: AnimationMetadata | AnimationMetadata[];
|
||||
options: AnimationQueryOptions | null;
|
||||
selector: string;
|
||||
|
@ -112,22 +112,22 @@ export declare interface AnimationQueryOptions extends AnimationOptions {
|
|||
optional?: boolean;
|
||||
}
|
||||
|
||||
export interface AnimationReferenceMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationReferenceMetadata extends AnimationMetadata {
|
||||
animation: AnimationMetadata | AnimationMetadata[];
|
||||
options: AnimationOptions | null;
|
||||
}
|
||||
|
||||
export interface AnimationSequenceMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationSequenceMetadata extends AnimationMetadata {
|
||||
options: AnimationOptions | null;
|
||||
steps: AnimationMetadata[];
|
||||
}
|
||||
|
||||
export interface AnimationStaggerMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationStaggerMetadata extends AnimationMetadata {
|
||||
animation: AnimationMetadata | AnimationMetadata[];
|
||||
timings: string | number;
|
||||
}
|
||||
|
||||
export interface AnimationStateMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationStateMetadata extends AnimationMetadata {
|
||||
name: string;
|
||||
options?: {
|
||||
params: {
|
||||
|
@ -137,7 +137,7 @@ export interface AnimationStateMetadata extends AnimationMetadata {
|
|||
styles: AnimationStyleMetadata;
|
||||
}
|
||||
|
||||
export interface AnimationStyleMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationStyleMetadata extends AnimationMetadata {
|
||||
offset: number | null;
|
||||
styles: '*' | {
|
||||
[key: string]: string | number;
|
||||
|
@ -146,7 +146,7 @@ export interface AnimationStyleMetadata extends AnimationMetadata {
|
|||
} | '*'>;
|
||||
}
|
||||
|
||||
export interface AnimationTransitionMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationTransitionMetadata extends AnimationMetadata {
|
||||
animation: AnimationMetadata | AnimationMetadata[];
|
||||
expr: string | ((fromState: string, toState: string, element?: any, params?: {
|
||||
[key: string]: any;
|
||||
|
@ -154,7 +154,7 @@ export interface AnimationTransitionMetadata extends AnimationMetadata {
|
|||
options: AnimationOptions | null;
|
||||
}
|
||||
|
||||
export interface AnimationTriggerMetadata extends AnimationMetadata {
|
||||
export declare interface AnimationTriggerMetadata extends AnimationMetadata {
|
||||
definitions: AnimationMetadata[];
|
||||
name: string;
|
||||
options: {
|
|
@ -128,7 +128,7 @@ export declare class JsonPipe implements PipeTransform {
|
|||
transform(value: any): string;
|
||||
}
|
||||
|
||||
export interface KeyValue<K, V> {
|
||||
export declare interface KeyValue<K, V> {
|
||||
key: K;
|
||||
value: V;
|
||||
}
|
||||
|
@ -165,12 +165,12 @@ export declare class Location {
|
|||
|
||||
export declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
|
||||
|
||||
export interface LocationChangeEvent {
|
||||
export declare interface LocationChangeEvent {
|
||||
state: any;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface LocationChangeListener {
|
||||
export declare interface LocationChangeListener {
|
||||
(event: LocationChangeEvent): any;
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ export declare enum Plural {
|
|||
Other = 5
|
||||
}
|
||||
|
||||
export interface PopStateEvent {
|
||||
export declare interface PopStateEvent {
|
||||
pop?: boolean;
|
||||
state?: any;
|
||||
type?: string;
|
|
@ -1489,7 +1489,7 @@ export declare class HttpClientXsrfModule {
|
|||
}): ModuleWithProviders<HttpClientXsrfModule>;
|
||||
}
|
||||
|
||||
export interface HttpDownloadProgressEvent extends HttpProgressEvent {
|
||||
export declare interface HttpDownloadProgressEvent extends HttpProgressEvent {
|
||||
partialText?: string;
|
||||
type: HttpEventType.DownloadProgress;
|
||||
}
|
||||
|
@ -1552,11 +1552,11 @@ export declare class HttpHeaders {
|
|||
set(name: string, value: string | string[]): HttpHeaders;
|
||||
}
|
||||
|
||||
export interface HttpInterceptor {
|
||||
export declare interface HttpInterceptor {
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
||||
}
|
||||
|
||||
export interface HttpParameterCodec {
|
||||
export declare interface HttpParameterCodec {
|
||||
decodeKey(key: string): string;
|
||||
decodeValue(value: string): string;
|
||||
encodeKey(key: string): string;
|
||||
|
@ -1575,7 +1575,7 @@ export declare class HttpParams {
|
|||
toString(): string;
|
||||
}
|
||||
|
||||
export interface HttpProgressEvent {
|
||||
export declare interface HttpProgressEvent {
|
||||
loaded: number;
|
||||
total?: number;
|
||||
type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress;
|
||||
|
@ -1690,11 +1690,11 @@ export declare abstract class HttpResponseBase {
|
|||
}, defaultStatus?: number, defaultStatusText?: string);
|
||||
}
|
||||
|
||||
export interface HttpSentEvent {
|
||||
export declare interface HttpSentEvent {
|
||||
type: HttpEventType.Sent;
|
||||
}
|
||||
|
||||
export interface HttpUploadProgressEvent extends HttpProgressEvent {
|
||||
export declare interface HttpUploadProgressEvent extends HttpProgressEvent {
|
||||
type: HttpEventType.UploadProgress;
|
||||
}
|
||||
|
||||
|
@ -1705,7 +1705,7 @@ export declare class HttpUrlEncodingCodec implements HttpParameterCodec {
|
|||
encodeValue(value: string): string;
|
||||
}
|
||||
|
||||
export interface HttpUserEvent<T> {
|
||||
export declare interface HttpUserEvent<T> {
|
||||
type: HttpEventType.User;
|
||||
}
|
||||
|
||||
|
@ -1719,7 +1719,7 @@ export declare abstract class HttpXsrfTokenExtractor {
|
|||
}
|
||||
|
||||
export declare class JsonpClientBackend implements HttpBackend {
|
||||
constructor(callbackMap: JsonpCallbackContext, document: any);
|
||||
constructor(callbackMap: ɵangular_packages_common_http_http_b, document: any);
|
||||
handle(req: HttpRequest<never>): Observable<HttpEvent<any>>;
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ export declare abstract class HttpTestingController {
|
|||
}): void;
|
||||
}
|
||||
|
||||
export interface RequestMatch {
|
||||
export declare interface RequestMatch {
|
||||
method?: string;
|
||||
url?: string;
|
||||
}
|
|
@ -39,7 +39,7 @@ export declare class MockPlatformLocation implements PlatformLocation {
|
|||
replaceState(state: any, title: string, newUrl: string): void;
|
||||
}
|
||||
|
||||
export interface MockPlatformLocationConfig {
|
||||
export declare interface MockPlatformLocationConfig {
|
||||
appBaseHref?: string;
|
||||
startUrl?: string;
|
||||
}
|
|
@ -64,7 +64,7 @@ export declare class AngularJSUrlCodec implements UrlCodec {
|
|||
|
||||
export declare const LOCATION_UPGRADE_CONFIGURATION: InjectionToken<LocationUpgradeConfig>;
|
||||
|
||||
export interface LocationUpgradeConfig {
|
||||
export declare interface LocationUpgradeConfig {
|
||||
appBaseHref?: string;
|
||||
hashPrefix?: string;
|
||||
serverBaseHref?: string;
|
|
@ -1,20 +1,20 @@
|
|||
export interface AbstractType<T> extends Function {
|
||||
export declare interface AbstractType<T> extends Function {
|
||||
prototype: T;
|
||||
}
|
||||
|
||||
export interface AfterContentChecked {
|
||||
export declare interface AfterContentChecked {
|
||||
ngAfterContentChecked(): void;
|
||||
}
|
||||
|
||||
export interface AfterContentInit {
|
||||
export declare interface AfterContentInit {
|
||||
ngAfterContentInit(): void;
|
||||
}
|
||||
|
||||
export interface AfterViewChecked {
|
||||
export declare interface AfterViewChecked {
|
||||
ngAfterViewChecked(): void;
|
||||
}
|
||||
|
||||
export interface AfterViewInit {
|
||||
export declare interface AfterViewInit {
|
||||
ngAfterViewInit(): void;
|
||||
}
|
||||
|
||||
|
@ -52,13 +52,13 @@ export declare function asNativeElements(debugEls: DebugElement[]): any;
|
|||
|
||||
export declare function assertPlatform(requiredToken: any): PlatformRef;
|
||||
|
||||
export interface Attribute {
|
||||
export declare interface Attribute {
|
||||
attributeName?: string;
|
||||
}
|
||||
|
||||
export declare const Attribute: AttributeDecorator;
|
||||
|
||||
export interface AttributeDecorator {
|
||||
export declare interface AttributeDecorator {
|
||||
(name: string): any;
|
||||
new (name: string): Attribute;
|
||||
}
|
||||
|
@ -76,17 +76,17 @@ export declare abstract class ChangeDetectorRef {
|
|||
abstract reattach(): void;
|
||||
}
|
||||
|
||||
export interface ClassProvider extends ClassSansProvider {
|
||||
export declare interface ClassProvider extends ClassSansProvider {
|
||||
multi?: boolean;
|
||||
provide: any;
|
||||
}
|
||||
|
||||
export interface ClassSansProvider {
|
||||
export declare interface ClassSansProvider {
|
||||
useClass: Type<any>;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {
|
||||
export declare interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {
|
||||
}
|
||||
|
||||
export declare class Compiler {
|
||||
|
@ -113,7 +113,7 @@ export declare type CompilerOptions = {
|
|||
preserveWhitespaces?: boolean;
|
||||
};
|
||||
|
||||
export interface Component extends Directive {
|
||||
export declare interface Component extends Directive {
|
||||
animations?: any[];
|
||||
changeDetection?: ChangeDetectionStrategy;
|
||||
encapsulation?: ViewEncapsulation;
|
||||
|
@ -130,26 +130,11 @@ export interface Component extends Directive {
|
|||
|
||||
export declare const Component: ComponentDecorator;
|
||||
|
||||
export interface ComponentDecorator {
|
||||
export declare interface ComponentDecorator {
|
||||
(obj: Component): TypeDecorator;
|
||||
new (obj: Component): Component;
|
||||
}
|
||||
|
||||
export declare abstract class ComponentFactory<C> {
|
||||
abstract get componentType(): Type<any>;
|
||||
abstract get inputs(): {
|
||||
propName: string;
|
||||
templateName: string;
|
||||
}[];
|
||||
abstract get ngContentSelectors(): string[];
|
||||
abstract get outputs(): {
|
||||
propName: string;
|
||||
templateName: string;
|
||||
}[];
|
||||
abstract get selector(): string;
|
||||
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
||||
}
|
||||
|
||||
export declare abstract class ComponentFactoryResolver {
|
||||
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
||||
static NULL: ComponentFactoryResolver;
|
||||
|
@ -166,18 +151,18 @@ export declare abstract class ComponentRef<C> {
|
|||
abstract onDestroy(callback: Function): void;
|
||||
}
|
||||
|
||||
export interface ConstructorProvider extends ConstructorSansProvider {
|
||||
export declare interface ConstructorProvider extends ConstructorSansProvider {
|
||||
multi?: boolean;
|
||||
provide: Type<any>;
|
||||
}
|
||||
|
||||
export interface ConstructorSansProvider {
|
||||
export declare interface ConstructorSansProvider {
|
||||
deps?: any[];
|
||||
}
|
||||
|
||||
export declare type ContentChild = Query;
|
||||
|
||||
export interface ContentChildDecorator {
|
||||
export declare interface ContentChildDecorator {
|
||||
(selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
static?: boolean;
|
||||
|
@ -190,7 +175,7 @@ export interface ContentChildDecorator {
|
|||
|
||||
export declare type ContentChildren = Query;
|
||||
|
||||
export interface ContentChildrenDecorator {
|
||||
export declare interface ContentChildrenDecorator {
|
||||
(selector: Type<any> | Function | string, opts?: {
|
||||
descendants?: boolean;
|
||||
read?: any;
|
||||
|
@ -207,7 +192,7 @@ export declare function createPlatformFactory(parentPlatformFactory: ((extraProv
|
|||
|
||||
export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
||||
|
||||
export interface DebugElement extends DebugNode {
|
||||
export declare interface DebugElement extends DebugNode {
|
||||
readonly attributes: {
|
||||
[key: string]: string | null;
|
||||
};
|
||||
|
@ -240,7 +225,7 @@ export declare class DebugEventListener {
|
|||
constructor(name: string, callback: Function);
|
||||
}
|
||||
|
||||
export interface DebugNode {
|
||||
export declare interface DebugNode {
|
||||
readonly componentInstance: any;
|
||||
readonly context: any;
|
||||
readonly injector: Injector;
|
||||
|
@ -282,7 +267,7 @@ export declare const defineInjectable: typeof ɵɵdefineInjectable;
|
|||
|
||||
export declare function destroyPlatform(): void;
|
||||
|
||||
export interface Directive {
|
||||
export declare interface Directive {
|
||||
exportAs?: string;
|
||||
host?: {
|
||||
[key: string]: string;
|
||||
|
@ -299,16 +284,16 @@ export interface Directive {
|
|||
|
||||
export declare const Directive: DirectiveDecorator;
|
||||
|
||||
export interface DirectiveDecorator {
|
||||
export declare interface DirectiveDecorator {
|
||||
(obj?: Directive): TypeDecorator;
|
||||
new (obj?: Directive): Directive;
|
||||
}
|
||||
|
||||
export interface DoBootstrap {
|
||||
export declare interface DoBootstrap {
|
||||
ngDoBootstrap(appRef: ApplicationRef): void;
|
||||
}
|
||||
|
||||
export interface DoCheck {
|
||||
export declare interface DoCheck {
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
||||
|
@ -334,28 +319,28 @@ export declare class EventEmitter<T extends any> extends Subject<T> {
|
|||
subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription;
|
||||
}
|
||||
|
||||
export interface ExistingProvider extends ExistingSansProvider {
|
||||
export declare interface ExistingProvider extends ExistingSansProvider {
|
||||
multi?: boolean;
|
||||
provide: any;
|
||||
}
|
||||
|
||||
export interface ExistingSansProvider {
|
||||
export declare interface ExistingSansProvider {
|
||||
useExisting: any;
|
||||
}
|
||||
|
||||
export interface FactoryProvider extends FactorySansProvider {
|
||||
export declare interface FactoryProvider extends FactorySansProvider {
|
||||
multi?: boolean;
|
||||
provide: any;
|
||||
}
|
||||
|
||||
export interface FactorySansProvider {
|
||||
export declare interface FactorySansProvider {
|
||||
deps?: any[];
|
||||
useFactory: Function;
|
||||
}
|
||||
|
||||
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
|
||||
|
||||
export interface ForwardRefFn {
|
||||
export declare interface ForwardRefFn {
|
||||
(): any;
|
||||
}
|
||||
|
||||
|
@ -365,59 +350,59 @@ export declare const getModuleFactory: (id: string) => NgModuleFactory<any>;
|
|||
|
||||
export declare function getPlatform(): PlatformRef | null;
|
||||
|
||||
export interface GetTestability {
|
||||
export declare interface GetTestability {
|
||||
addToWindow(registry: TestabilityRegistry): void;
|
||||
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
|
||||
}
|
||||
|
||||
export interface Host {
|
||||
export declare interface Host {
|
||||
}
|
||||
|
||||
export declare const Host: HostDecorator;
|
||||
|
||||
export interface HostBinding {
|
||||
export declare interface HostBinding {
|
||||
hostPropertyName?: string;
|
||||
}
|
||||
|
||||
export declare const HostBinding: HostBindingDecorator;
|
||||
|
||||
export interface HostBindingDecorator {
|
||||
export declare interface HostBindingDecorator {
|
||||
(hostPropertyName?: string): any;
|
||||
new (hostPropertyName?: string): any;
|
||||
}
|
||||
|
||||
export interface HostDecorator {
|
||||
export declare interface HostDecorator {
|
||||
(): any;
|
||||
new (): Host;
|
||||
}
|
||||
|
||||
export interface HostListener {
|
||||
export declare interface HostListener {
|
||||
args?: string[];
|
||||
eventName?: string;
|
||||
}
|
||||
|
||||
export declare const HostListener: HostListenerDecorator;
|
||||
|
||||
export interface HostListenerDecorator {
|
||||
export declare interface HostListenerDecorator {
|
||||
(eventName: string, args?: string[]): any;
|
||||
new (eventName: string, args?: string[]): any;
|
||||
}
|
||||
|
||||
export declare const inject: typeof ɵɵinject;
|
||||
|
||||
export interface Inject {
|
||||
export declare interface Inject {
|
||||
token: any;
|
||||
}
|
||||
|
||||
export declare const Inject: InjectDecorator;
|
||||
|
||||
export interface Injectable {
|
||||
export declare interface Injectable {
|
||||
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
||||
}
|
||||
|
||||
export declare const Injectable: InjectableDecorator;
|
||||
|
||||
export interface InjectableDecorator {
|
||||
export declare interface InjectableDecorator {
|
||||
(): TypeDecorator;
|
||||
(options?: {
|
||||
providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
|
||||
|
@ -430,11 +415,11 @@ export interface InjectableDecorator {
|
|||
|
||||
export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
|
||||
|
||||
export interface InjectableType<T> extends Type<T> {
|
||||
export declare interface InjectableType<T> extends Type<T> {
|
||||
ɵprov: never;
|
||||
}
|
||||
|
||||
export interface InjectDecorator {
|
||||
export declare interface InjectDecorator {
|
||||
(token: any): any;
|
||||
new (token: any): Inject;
|
||||
}
|
||||
|
@ -473,31 +458,31 @@ export declare abstract class Injector {
|
|||
|
||||
export declare const INJECTOR: InjectionToken<Injector>;
|
||||
|
||||
export interface InjectorType<T> extends Type<T> {
|
||||
export declare interface InjectorType<T> extends Type<T> {
|
||||
ɵinj: never;
|
||||
}
|
||||
|
||||
export interface Input {
|
||||
export declare interface Input {
|
||||
bindingPropertyName?: string;
|
||||
}
|
||||
|
||||
export declare const Input: InputDecorator;
|
||||
|
||||
export interface InputDecorator {
|
||||
export declare interface InputDecorator {
|
||||
(bindingPropertyName?: string): any;
|
||||
new (bindingPropertyName?: string): any;
|
||||
}
|
||||
|
||||
export declare function isDevMode(): boolean;
|
||||
|
||||
export interface IterableChangeRecord<V> {
|
||||
export declare interface IterableChangeRecord<V> {
|
||||
readonly currentIndex: number | null;
|
||||
readonly item: V;
|
||||
readonly previousIndex: number | null;
|
||||
readonly trackById: any;
|
||||
}
|
||||
|
||||
export interface IterableChanges<V> {
|
||||
export declare interface IterableChanges<V> {
|
||||
forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
||||
forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
|
||||
forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
||||
|
@ -507,11 +492,11 @@ export interface IterableChanges<V> {
|
|||
forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
||||
}
|
||||
|
||||
export interface IterableDiffer<V> {
|
||||
export declare interface IterableDiffer<V> {
|
||||
diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;
|
||||
}
|
||||
|
||||
export interface IterableDifferFactory {
|
||||
export declare interface IterableDifferFactory {
|
||||
create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
|
||||
supports(objects: any): boolean;
|
||||
}
|
||||
|
@ -525,13 +510,13 @@ export declare class IterableDiffers {
|
|||
static extend(factories: IterableDifferFactory[]): StaticProvider;
|
||||
}
|
||||
|
||||
export interface KeyValueChangeRecord<K, V> {
|
||||
export declare interface KeyValueChangeRecord<K, V> {
|
||||
readonly currentValue: V | null;
|
||||
readonly key: K;
|
||||
readonly previousValue: V | null;
|
||||
}
|
||||
|
||||
export interface KeyValueChanges<K, V> {
|
||||
export declare interface KeyValueChanges<K, V> {
|
||||
forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
||||
forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
||||
forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
||||
|
@ -539,14 +524,14 @@ export interface KeyValueChanges<K, V> {
|
|||
forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
||||
}
|
||||
|
||||
export interface KeyValueDiffer<K, V> {
|
||||
export declare interface KeyValueDiffer<K, V> {
|
||||
diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
|
||||
diff(object: {
|
||||
[key: string]: V;
|
||||
}): KeyValueChanges<string, V> | null;
|
||||
}
|
||||
|
||||
export interface KeyValueDifferFactory {
|
||||
export declare interface KeyValueDifferFactory {
|
||||
create<K, V>(): KeyValueDiffer<K, V>;
|
||||
supports(objects: any): boolean;
|
||||
}
|
||||
|
@ -574,14 +559,14 @@ export declare class ModuleWithComponentFactories<T> {
|
|||
constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
|
||||
}
|
||||
|
||||
export interface ModuleWithProviders<T = any /** TODO(alxhub): remove default when callers pass explicit type param */> {
|
||||
export declare interface ModuleWithProviders<T = any /** TODO(alxhub): remove default when callers pass explicit type param */> {
|
||||
ngModule: Type<T>;
|
||||
providers?: Provider[];
|
||||
}
|
||||
|
||||
export declare type NgIterable<T> = Array<T> | Iterable<T>;
|
||||
|
||||
export interface NgModule {
|
||||
export declare interface NgModule {
|
||||
bootstrap?: Array<Type<any> | any[]>;
|
||||
declarations?: Array<Type<any> | any[]>;
|
||||
/** @deprecated */ entryComponents?: Array<Type<any> | any[]>;
|
||||
|
@ -595,7 +580,7 @@ export interface NgModule {
|
|||
|
||||
export declare const NgModule: NgModuleDecorator;
|
||||
|
||||
export interface NgModuleDecorator {
|
||||
export declare interface NgModuleDecorator {
|
||||
(obj?: NgModule): TypeDecorator;
|
||||
new (obj?: NgModule): NgModule;
|
||||
}
|
||||
|
@ -647,35 +632,35 @@ export declare class NgZone {
|
|||
|
||||
export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
||||
|
||||
export interface OnChanges {
|
||||
export declare interface OnChanges {
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
}
|
||||
|
||||
export interface OnDestroy {
|
||||
export declare interface OnDestroy {
|
||||
ngOnDestroy(): void;
|
||||
}
|
||||
|
||||
export interface OnInit {
|
||||
export declare interface OnInit {
|
||||
ngOnInit(): void;
|
||||
}
|
||||
|
||||
export interface Optional {
|
||||
export declare interface Optional {
|
||||
}
|
||||
|
||||
export declare const Optional: OptionalDecorator;
|
||||
|
||||
export interface OptionalDecorator {
|
||||
export declare interface OptionalDecorator {
|
||||
(): any;
|
||||
new (): Optional;
|
||||
}
|
||||
|
||||
export interface Output {
|
||||
export declare interface Output {
|
||||
bindingPropertyName?: string;
|
||||
}
|
||||
|
||||
export declare const Output: OutputDecorator;
|
||||
|
||||
export interface OutputDecorator {
|
||||
export declare interface OutputDecorator {
|
||||
(bindingPropertyName?: string): any;
|
||||
new (bindingPropertyName?: string): any;
|
||||
}
|
||||
|
@ -730,7 +715,7 @@ export declare type ɵɵComponentDefWithMeta<T, Selector extends String, ExportA
|
|||
[key: string]: string;
|
||||
}, OutputMap extends {
|
||||
[key: string]: string;
|
||||
}, QueryFields extends string[]> = ComponentDef<T>;
|
||||
}, QueryFields extends string[]> = ɵComponentDef<T>;
|
||||
|
||||
export declare function ɵɵcomponentHostSyntheticListener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): typeof ɵɵcomponentHostSyntheticListener;
|
||||
|
||||
|
@ -742,13 +727,13 @@ export declare function ɵɵcontainerRefreshStart(index: number): void;
|
|||
|
||||
export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: Type<any> | string[], descend: boolean, read?: any): void;
|
||||
|
||||
export declare function ɵɵCopyDefinitionFeature(definition: DirectiveDef<any> | ComponentDef<any>): void;
|
||||
export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
|
||||
|
||||
export declare const ɵɵdefaultStyleSanitizer: StyleSanitizeFn;
|
||||
|
||||
export declare function ɵɵdefineComponent<T>(componentDefinition: {
|
||||
type: Type<T>;
|
||||
selectors?: CssSelectorList;
|
||||
selectors?: ɵCssSelectorList;
|
||||
decls: number;
|
||||
vars: number;
|
||||
inputs?: {
|
||||
|
@ -780,7 +765,7 @@ export declare function ɵɵdefineComponent<T>(componentDefinition: {
|
|||
|
||||
export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
|
||||
type: Type<T>;
|
||||
selectors?: CssSelectorList | 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;
|
||||
|
@ -824,7 +809,7 @@ export declare type ɵɵDirectiveDefWithMeta<T, Selector extends string, ExportA
|
|||
[key: string]: string;
|
||||
}, OutputMap extends {
|
||||
[key: string]: string;
|
||||
}, QueryFields extends string[]> = DirectiveDef<T>;
|
||||
}, QueryFields extends string[]> = ɵDirectiveDef<T>;
|
||||
|
||||
export declare function ɵɵdirectiveInject<T>(token: Type<T> | InjectionToken<T>): T;
|
||||
export declare function ɵɵdirectiveInject<T>(token: Type<T> | InjectionToken<T>, flags: InjectFlags): T;
|
||||
|
@ -845,7 +830,7 @@ export declare function ɵɵelementStart(index: number, name: string, attrsIndex
|
|||
|
||||
export declare function ɵɵembeddedViewEnd(): void;
|
||||
|
||||
export declare function ɵɵembeddedViewStart(viewBlockId: number, decls: number, vars: number): RenderFlags;
|
||||
export declare function ɵɵembeddedViewStart(viewBlockId: number, decls: number, vars: number): ɵRenderFlags;
|
||||
|
||||
export declare function ɵɵenableBindings(): void;
|
||||
|
||||
|
@ -875,12 +860,12 @@ export declare function ɵɵi18nPostprocess(message: string, replacements?: {
|
|||
|
||||
export declare function ɵɵi18nStart(index: number, message: string, subTemplateIndex?: number): void;
|
||||
|
||||
export declare function ɵɵInheritDefinitionFeature(definition: DirectiveDef<any> | ComponentDef<any>): void;
|
||||
export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
|
||||
|
||||
export declare function ɵɵinject<T>(token: Type<T> | InjectionToken<T>): T;
|
||||
export declare function ɵɵinject<T>(token: Type<T> | InjectionToken<T>, flags?: InjectFlags): T | null;
|
||||
|
||||
export interface ɵɵInjectableDef<T> {
|
||||
export declare interface ɵɵInjectableDef<T> {
|
||||
factory: (t?: Type<any>) => T;
|
||||
providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | null;
|
||||
token: unknown;
|
||||
|
@ -889,7 +874,7 @@ export interface ɵɵInjectableDef<T> {
|
|||
|
||||
export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null;
|
||||
|
||||
export interface ɵɵInjectorDef<T> {
|
||||
export declare interface ɵɵInjectorDef<T> {
|
||||
factory: () => T;
|
||||
imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
|
||||
providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
|
||||
|
@ -913,9 +898,9 @@ export declare function ɵɵnamespaceSVG(): void;
|
|||
|
||||
export declare function ɵɵnextContext<T = any>(level?: number): T;
|
||||
|
||||
export declare type ɵɵNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleDef<T>;
|
||||
export declare type ɵɵNgModuleDefWithMeta<T, Declarations, Imports, Exports> = ɵNgModuleDef<T>;
|
||||
|
||||
export declare function ɵɵNgOnChangesFeature<T>(definition: DirectiveDef<T>): void;
|
||||
export declare function ɵɵNgOnChangesFeature<T>(definition: ɵDirectiveDef<T>): void;
|
||||
|
||||
export declare function ɵɵpipe(index: number, pipeName: string): any;
|
||||
|
||||
|
@ -929,7 +914,7 @@ export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any
|
|||
|
||||
export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any;
|
||||
|
||||
export declare type ɵɵPipeDefWithMeta<T, Name extends string> = PipeDef<T>;
|
||||
export declare type ɵɵPipeDefWithMeta<T, Name extends string> = ɵPipeDef<T>;
|
||||
|
||||
export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
|
||||
|
||||
|
@ -957,7 +942,7 @@ export declare function ɵɵpropertyInterpolate8(propName: string, prefix: strin
|
|||
|
||||
export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV;
|
||||
|
||||
export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: DirectiveDef<T>) => void;
|
||||
export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: ɵDirectiveDef<T>) => void;
|
||||
|
||||
export declare function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T;
|
||||
|
||||
|
@ -1021,7 +1006,7 @@ export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string
|
|||
/** @deprecated */
|
||||
export declare function ɵɵselect(index: number): void;
|
||||
|
||||
export declare function ɵɵsetComponentScope(type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void;
|
||||
export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void;
|
||||
|
||||
export declare function ɵɵsetNgModuleScope(type: any, scope: {
|
||||
declarations?: Type<any>[] | (() => Type<any>[]);
|
||||
|
@ -1055,7 +1040,7 @@ export declare function ɵɵstyleMapInterpolate8(prefix: string, v0: any, i0: st
|
|||
|
||||
export declare function ɵɵstyleMapInterpolateV(values: any[]): void;
|
||||
|
||||
export declare function ɵɵstyleProp(prop: string, value: string | number | SafeValue | undefined | null, suffix?: string | null): typeof ɵɵstyleProp;
|
||||
export declare function ɵɵstyleProp(prop: string, value: string | number | ɵSafeValue | undefined | null, suffix?: string | null): typeof ɵɵstyleProp;
|
||||
|
||||
export declare function ɵɵstylePropInterpolate1(prop: string, prefix: string, v0: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate1;
|
||||
|
||||
|
@ -1079,7 +1064,7 @@ export declare function ɵɵstyleSanitizer(sanitizer: StyleSanitizeFn | null): v
|
|||
|
||||
export declare function ɵɵtemplate(index: number, templateFn: ComponentTemplate<any> | null, decls: number, vars: number, tagName?: string | null, attrsIndex?: number | null, localRefsIndex?: number | null, localRefExtractor?: LocalRefExtractor): void;
|
||||
|
||||
export declare function ɵɵtemplateRefExtractor(tNode: TNode, currentView: LView): ViewEngine_TemplateRef<unknown> | null;
|
||||
export declare function ɵɵtemplateRefExtractor(tNode: TNode, currentView: ɵangular_packages_core_core_bp): TemplateRef<unknown> | null;
|
||||
|
||||
export declare function ɵɵtext(index: number, value?: string): void;
|
||||
|
||||
|
@ -1103,25 +1088,25 @@ export declare function ɵɵtextInterpolate8(prefix: string, v0: any, i0: string
|
|||
|
||||
export declare function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV;
|
||||
|
||||
export declare function ɵɵupdateSyntheticHostBinding<T>(propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null): typeof ɵɵupdateSyntheticHostBinding;
|
||||
export declare function ɵɵupdateSyntheticHostBinding<T>(propName: string, value: T | ɵNO_CHANGE, sanitizer?: SanitizerFn | null): typeof ɵɵupdateSyntheticHostBinding;
|
||||
|
||||
export declare function ɵɵviewQuery<T>(predicate: Type<any> | string[], descend: boolean, read?: any): void;
|
||||
|
||||
export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
|
||||
|
||||
export interface Pipe {
|
||||
export declare interface Pipe {
|
||||
name: string;
|
||||
pure?: boolean;
|
||||
}
|
||||
|
||||
export declare const Pipe: PipeDecorator;
|
||||
|
||||
export interface PipeDecorator {
|
||||
export declare interface PipeDecorator {
|
||||
(obj: Pipe): TypeDecorator;
|
||||
new (obj: Pipe): Pipe;
|
||||
}
|
||||
|
||||
export interface PipeTransform {
|
||||
export declare interface PipeTransform {
|
||||
transform(value: any, ...args: any[]): any;
|
||||
}
|
||||
|
||||
|
@ -1140,13 +1125,13 @@ export declare class PlatformRef {
|
|||
onDestroy(callback: () => void): void;
|
||||
}
|
||||
|
||||
export interface Predicate<T> {
|
||||
export declare interface Predicate<T> {
|
||||
(value: T): boolean;
|
||||
}
|
||||
|
||||
export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
|
||||
|
||||
export interface Query {
|
||||
export declare interface Query {
|
||||
descendants: boolean;
|
||||
first: boolean;
|
||||
isViewQuery: boolean;
|
||||
|
@ -1241,7 +1226,7 @@ export declare enum RendererStyleFlags2 {
|
|||
DashCase = 2
|
||||
}
|
||||
|
||||
export interface RendererType2 {
|
||||
export declare interface RendererType2 {
|
||||
data: {
|
||||
[kind: string]: any;
|
||||
};
|
||||
|
@ -1251,14 +1236,14 @@ export interface RendererType2 {
|
|||
}
|
||||
|
||||
export declare class ResolvedReflectiveFactory {
|
||||
dependencies: ReflectiveDependency[];
|
||||
dependencies: ɵangular_packages_core_core_e[];
|
||||
factory: Function;
|
||||
constructor(
|
||||
factory: Function,
|
||||
dependencies: ReflectiveDependency[]);
|
||||
dependencies: ɵangular_packages_core_core_e[]);
|
||||
}
|
||||
|
||||
export interface ResolvedReflectiveProvider {
|
||||
export declare interface ResolvedReflectiveProvider {
|
||||
key: ReflectiveKey;
|
||||
multiProvider: boolean;
|
||||
resolvedFactories: ResolvedReflectiveFactory[];
|
||||
|
@ -1271,7 +1256,7 @@ export declare abstract class Sanitizer {
|
|||
static ɵprov: never;
|
||||
}
|
||||
|
||||
export interface SchemaMetadata {
|
||||
export declare interface SchemaMetadata {
|
||||
name: string;
|
||||
}
|
||||
|
||||
|
@ -1284,12 +1269,12 @@ export declare enum SecurityContext {
|
|||
RESOURCE_URL = 5
|
||||
}
|
||||
|
||||
export interface Self {
|
||||
export declare interface Self {
|
||||
}
|
||||
|
||||
export declare const Self: SelfDecorator;
|
||||
|
||||
export interface SelfDecorator {
|
||||
export declare interface SelfDecorator {
|
||||
(): any;
|
||||
new (): Self;
|
||||
}
|
||||
|
@ -1304,26 +1289,26 @@ export declare class SimpleChange {
|
|||
isFirstChange(): boolean;
|
||||
}
|
||||
|
||||
export interface SimpleChanges {
|
||||
export declare interface SimpleChanges {
|
||||
[propName: string]: SimpleChange;
|
||||
}
|
||||
|
||||
export interface SkipSelf {
|
||||
export declare interface SkipSelf {
|
||||
}
|
||||
|
||||
export declare const SkipSelf: SkipSelfDecorator;
|
||||
|
||||
export interface SkipSelfDecorator {
|
||||
export declare interface SkipSelfDecorator {
|
||||
(): any;
|
||||
new (): SkipSelf;
|
||||
}
|
||||
|
||||
export interface StaticClassProvider extends StaticClassSansProvider {
|
||||
export declare interface StaticClassProvider extends StaticClassSansProvider {
|
||||
multi?: boolean;
|
||||
provide: any;
|
||||
}
|
||||
|
||||
export interface StaticClassSansProvider {
|
||||
export declare interface StaticClassSansProvider {
|
||||
deps: any[];
|
||||
useClass: Type<any>;
|
||||
}
|
||||
|
@ -1368,7 +1353,7 @@ export declare class TestabilityRegistry {
|
|||
unregisterApplication(token: any): void;
|
||||
}
|
||||
|
||||
export interface TrackByFunction<T> {
|
||||
export declare interface TrackByFunction<T> {
|
||||
(index: number, item: T): any;
|
||||
}
|
||||
|
||||
|
@ -1378,20 +1363,20 @@ export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
|
|||
|
||||
export declare const Type: FunctionConstructor;
|
||||
|
||||
export interface TypeDecorator {
|
||||
export declare interface TypeDecorator {
|
||||
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
||||
<T extends Type<any>>(type: T): T;
|
||||
}
|
||||
|
||||
export interface TypeProvider extends Type<any> {
|
||||
export declare interface TypeProvider extends Type<any> {
|
||||
}
|
||||
|
||||
export interface ValueProvider extends ValueSansProvider {
|
||||
export declare interface ValueProvider extends ValueSansProvider {
|
||||
multi?: boolean;
|
||||
provide: any;
|
||||
}
|
||||
|
||||
export interface ValueSansProvider {
|
||||
export declare interface ValueSansProvider {
|
||||
useValue: any;
|
||||
}
|
||||
|
||||
|
@ -1407,7 +1392,7 @@ export declare const VERSION: Version;
|
|||
|
||||
export declare type ViewChild = Query;
|
||||
|
||||
export interface ViewChildDecorator {
|
||||
export declare interface ViewChildDecorator {
|
||||
(selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
static?: boolean;
|
||||
|
@ -1420,7 +1405,7 @@ export interface ViewChildDecorator {
|
|||
|
||||
export declare type ViewChildren = Query;
|
||||
|
||||
export interface ViewChildrenDecorator {
|
||||
export declare interface ViewChildrenDecorator {
|
||||
(selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
}): any;
|
|
@ -47,7 +47,7 @@ export declare type MetadataOverride<T> = {
|
|||
|
||||
export declare function resetFakeAsyncZone(): void;
|
||||
|
||||
export interface TestBed {
|
||||
export declare interface TestBed {
|
||||
ngModule: Type<any> | Type<any>[];
|
||||
platform: PlatformRef;
|
||||
compileComponents(): Promise<any>;
|
||||
|
@ -86,7 +86,7 @@ export interface TestBed {
|
|||
|
||||
export declare const TestBed: TestBedStatic;
|
||||
|
||||
export interface TestBedStatic {
|
||||
export declare interface TestBedStatic {
|
||||
new (...args: any[]): TestBed;
|
||||
compileComponents(): Promise<any>;
|
||||
configureCompiler(config: {
|
|
@ -8,17 +8,17 @@ export declare abstract class NgElement extends HTMLElement {
|
|||
abstract disconnectedCallback(): void;
|
||||
}
|
||||
|
||||
export interface NgElementConfig {
|
||||
export declare interface NgElementConfig {
|
||||
injector: Injector;
|
||||
strategyFactory?: NgElementStrategyFactory;
|
||||
}
|
||||
|
||||
export interface NgElementConstructor<P> {
|
||||
export declare interface NgElementConstructor<P> {
|
||||
readonly observedAttributes: string[];
|
||||
new (injector?: Injector): NgElement & WithProperties<P>;
|
||||
}
|
||||
|
||||
export interface NgElementStrategy {
|
||||
export declare interface NgElementStrategy {
|
||||
events: Observable<NgElementStrategyEvent>;
|
||||
connect(element: HTMLElement): void;
|
||||
disconnect(): void;
|
||||
|
@ -26,12 +26,12 @@ export interface NgElementStrategy {
|
|||
setInputValue(propName: string, value: string): void;
|
||||
}
|
||||
|
||||
export interface NgElementStrategyEvent {
|
||||
export declare interface NgElementStrategyEvent {
|
||||
name: string;
|
||||
value: any;
|
||||
}
|
||||
|
||||
export interface NgElementStrategyFactory {
|
||||
export declare interface NgElementStrategyFactory {
|
||||
create(injector: Injector): NgElementStrategy;
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ export declare abstract class AbstractControlDirective {
|
|||
reset(value?: any): void;
|
||||
}
|
||||
|
||||
export interface AbstractControlOptions {
|
||||
export declare interface AbstractControlOptions {
|
||||
asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[] | null;
|
||||
updateOn?: 'change' | 'blur' | 'submit';
|
||||
validators?: ValidatorFn | ValidatorFn[] | null;
|
||||
|
@ -102,11 +102,11 @@ export declare class AbstractFormGroupDirective extends ControlContainer impleme
|
|||
ngOnInit(): void;
|
||||
}
|
||||
|
||||
export interface AsyncValidator extends Validator {
|
||||
export declare interface AsyncValidator extends Validator {
|
||||
validate(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
|
||||
}
|
||||
|
||||
export interface AsyncValidatorFn {
|
||||
export declare interface AsyncValidatorFn {
|
||||
(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ export declare abstract class ControlContainer extends AbstractControlDirective
|
|||
get path(): string[] | null;
|
||||
}
|
||||
|
||||
export interface ControlValueAccessor {
|
||||
export declare interface ControlValueAccessor {
|
||||
registerOnChange(fn: any): void;
|
||||
registerOnTouched(fn: any): void;
|
||||
setDisabledState?(isDisabled: boolean): void;
|
||||
|
@ -155,7 +155,7 @@ export declare class EmailValidator implements Validator {
|
|||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export interface Form {
|
||||
export declare interface Form {
|
||||
addControl(dir: NgControl): void;
|
||||
addFormGroup(dir: AbstractFormGroupDirective): void;
|
||||
getControl(dir: NgControl): FormControl;
|
||||
|
@ -357,11 +357,11 @@ export declare abstract class NgControl extends AbstractControlDirective {
|
|||
abstract viewToModelUpdate(newValue: any): void;
|
||||
}
|
||||
|
||||
export declare class NgControlStatus extends AbstractControlStatus {
|
||||
export declare class NgControlStatus extends ɵangular_packages_forms_forms_g {
|
||||
constructor(cd: NgControl);
|
||||
}
|
||||
|
||||
export declare class NgControlStatusGroup extends AbstractControlStatus {
|
||||
export declare class NgControlStatusGroup extends ɵangular_packages_forms_forms_g {
|
||||
constructor(cd: ControlContainer);
|
||||
}
|
||||
|
||||
|
@ -454,7 +454,7 @@ export declare class RadioControlValueAccessor implements ControlValueAccessor,
|
|||
onChange: () => void;
|
||||
onTouched: () => void;
|
||||
value: any;
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef, _registry: RadioControlRegistry, _injector: Injector);
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef, _registry: ɵangular_packages_forms_forms_n, _injector: Injector);
|
||||
fireUncheck(value: any): void;
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
|
@ -514,12 +514,12 @@ export declare type ValidationErrors = {
|
|||
[key: string]: any;
|
||||
};
|
||||
|
||||
export interface Validator {
|
||||
export declare interface Validator {
|
||||
registerOnValidatorChange?(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export interface ValidatorFn {
|
||||
export declare interface ValidatorFn {
|
||||
(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
|
@ -112,13 +112,13 @@ export declare enum ReadyState {
|
|||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class Request extends Body {
|
||||
export declare class Request extends ɵangular_packages_http_http_f {
|
||||
headers: Headers;
|
||||
method: RequestMethod;
|
||||
responseType: ResponseContentType;
|
||||
url: string;
|
||||
withCredentials: boolean;
|
||||
constructor(requestOptions: RequestArgs);
|
||||
constructor(requestOptions: ɵangular_packages_http_http_d);
|
||||
detectContentType(): ContentType;
|
||||
detectContentTypeFromBody(): ContentType;
|
||||
getBody(): any;
|
||||
|
@ -151,7 +151,7 @@ export declare class RequestOptions {
|
|||
}
|
||||
|
||||
/** @deprecated */
|
||||
export interface RequestOptionsArgs {
|
||||
export declare interface RequestOptionsArgs {
|
||||
body?: any;
|
||||
headers?: Headers | null;
|
||||
method?: string | RequestMethod | null;
|
||||
|
@ -167,7 +167,7 @@ export interface RequestOptionsArgs {
|
|||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class Response extends Body {
|
||||
export declare class Response extends ɵangular_packages_http_http_f {
|
||||
bytesLoaded: number;
|
||||
headers: Headers | null;
|
||||
ok: boolean;
|
||||
|
@ -199,7 +199,7 @@ export declare class ResponseOptions {
|
|||
}
|
||||
|
||||
/** @deprecated */
|
||||
export interface ResponseOptionsArgs {
|
||||
export declare interface ResponseOptionsArgs {
|
||||
body?: string | Object | FormData | ArrayBuffer | Blob | null;
|
||||
headers?: Headers | null;
|
||||
status?: number | null;
|
|
@ -0,0 +1,54 @@
|
|||
const {exec} = require('shelljs');
|
||||
const minimist = require('minimist');
|
||||
|
||||
// Remove all command line flags from the arguments.
|
||||
const argv = minimist(process.argv.slice(2));
|
||||
// The command the user would like to run, either 'accept' or 'test'
|
||||
const USER_COMMAND = argv._[0];
|
||||
// The shell command to query for all Public API guard tests.
|
||||
const BAZEL_PUBLIC_API_TARGET_QUERY_CMD =
|
||||
`yarn -s bazel query --output label 'kind(nodejs_test, ...) intersect attr("tags", "api_guard", ...)'`
|
||||
// Bazel targets for testing Public API goldens
|
||||
process.stdout.write('Gathering all Public API targets');
|
||||
const ALL_PUBLIC_API_TESTS = exec(BAZEL_PUBLIC_API_TARGET_QUERY_CMD, {silent: true})
|
||||
.trim()
|
||||
.split('\n')
|
||||
.map(test => test.trim());
|
||||
process.stdout.clearLine();
|
||||
process.stdout.cursorTo(0);
|
||||
// Bazel targets for generating Public API goldens
|
||||
const ALL_PUBLIC_API_ACCEPTS = ALL_PUBLIC_API_TESTS.map(test => `${test}.accept`);
|
||||
|
||||
/**
|
||||
* Run the provided bazel commands on each provided target individually.
|
||||
*/
|
||||
function runBazelCommandOnTargets(command, targets, present) {
|
||||
for (const target of targets) {
|
||||
process.stdout.write(`${present}: ${target}`);
|
||||
const commandResult = exec(`yarn -s bazel ${command} ${target}`, {silent: true});
|
||||
process.stdout.clearLine();
|
||||
process.stdout.cursorTo(0);
|
||||
if (commandResult.code) {
|
||||
console.error(`Failed ${command}: ${target}`);
|
||||
console.group();
|
||||
console.error(commandResult.stdout || commandResult.stderr);
|
||||
console.groupEnd();
|
||||
} else {
|
||||
console.log(`Successful ${command}: ${target}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (USER_COMMAND) {
|
||||
case 'accept':
|
||||
runBazelCommandOnTargets('run', ALL_PUBLIC_API_ACCEPTS, 'Running');
|
||||
break;
|
||||
case 'test':
|
||||
runBazelCommandOnTargets('test', ALL_PUBLIC_API_TESTS, 'Testing');
|
||||
break;
|
||||
default:
|
||||
console.warn('Invalid command provided.');
|
||||
console.warn();
|
||||
console.warn(`Run this script with either "accept" and "test"`);
|
||||
break;
|
||||
}
|
|
@ -27,10 +27,10 @@ export declare abstract class DomSanitizer implements Sanitizer {
|
|||
|
||||
export declare function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T>;
|
||||
|
||||
export declare const EVENT_MANAGER_PLUGINS: InjectionToken<EventManagerPlugin[]>;
|
||||
export declare const EVENT_MANAGER_PLUGINS: InjectionToken<ɵangular_packages_platform_browser_platform_browser_g[]>;
|
||||
|
||||
export declare class EventManager {
|
||||
constructor(plugins: EventManagerPlugin[], _zone: NgZone);
|
||||
constructor(plugins: ɵangular_packages_platform_browser_platform_browser_g[], _zone: NgZone);
|
||||
addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
||||
addGlobalEventListener(target: string, eventName: string, handler: Function): Function;
|
||||
getZone(): NgZone;
|
||||
|
@ -92,22 +92,22 @@ export declare type MetaDefinition = {
|
|||
|
||||
export declare const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef;
|
||||
|
||||
export interface SafeHtml extends SafeValue {
|
||||
export declare interface SafeHtml extends SafeValue {
|
||||
}
|
||||
|
||||
export interface SafeResourceUrl extends SafeValue {
|
||||
export declare interface SafeResourceUrl extends SafeValue {
|
||||
}
|
||||
|
||||
export interface SafeScript extends SafeValue {
|
||||
export declare interface SafeScript extends SafeValue {
|
||||
}
|
||||
|
||||
export interface SafeStyle extends SafeValue {
|
||||
export declare interface SafeStyle extends SafeValue {
|
||||
}
|
||||
|
||||
export interface SafeUrl extends SafeValue {
|
||||
export declare interface SafeUrl extends SafeValue {
|
||||
}
|
||||
|
||||
export interface SafeValue {
|
||||
export declare interface SafeValue {
|
||||
}
|
||||
|
||||
export declare type StateKey<T> = string & {
|
|
@ -2,7 +2,7 @@ export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void | Promise
|
|||
|
||||
export declare const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
|
||||
|
||||
export interface PlatformConfig {
|
||||
export declare interface PlatformConfig {
|
||||
document?: string;
|
||||
url?: string;
|
||||
}
|
|
@ -27,14 +27,14 @@ export declare abstract class MessageBus implements MessageBusSource, MessageBus
|
|||
}
|
||||
|
||||
/** @deprecated */
|
||||
export interface MessageBusSink {
|
||||
export declare interface MessageBusSink {
|
||||
attachToZone(zone: NgZone): void;
|
||||
initChannel(channel: string, runInZone: boolean): void;
|
||||
to(channel: string): EventEmitter<any>;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export interface MessageBusSource {
|
||||
export declare interface MessageBusSource {
|
||||
attachToZone(zone: NgZone): void;
|
||||
from(channel: string): EventEmitter<any>;
|
||||
initChannel(channel: string, runInZone: boolean): void;
|
||||
|
@ -47,7 +47,7 @@ export declare const platformWorkerApp: (extraProviders?: StaticProvider[] | und
|
|||
export declare const platformWorkerUi: (extraProviders?: StaticProvider[] | undefined) => import("@angular/core").PlatformRef;
|
||||
|
||||
/** @deprecated */
|
||||
export interface ReceivedMessage {
|
||||
export declare interface ReceivedMessage {
|
||||
args: any[];
|
||||
id: string;
|
||||
method: string;
|
|
@ -51,19 +51,19 @@ export declare class ActivationStart {
|
|||
toString(): string;
|
||||
}
|
||||
|
||||
export interface CanActivate {
|
||||
export declare interface CanActivate {
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
||||
}
|
||||
|
||||
export interface CanActivateChild {
|
||||
export declare interface CanActivateChild {
|
||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
||||
}
|
||||
|
||||
export interface CanDeactivate<T> {
|
||||
export declare interface CanDeactivate<T> {
|
||||
canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
||||
}
|
||||
|
||||
export interface CanLoad {
|
||||
export declare interface CanLoad {
|
||||
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ export declare type DetachedRouteHandle = {};
|
|||
|
||||
export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;
|
||||
|
||||
export interface ExtraOptions {
|
||||
export declare interface ExtraOptions {
|
||||
anchorScrolling?: 'disabled' | 'enabled';
|
||||
enableTracing?: boolean;
|
||||
errorHandler?: ErrorHandler;
|
||||
|
@ -192,7 +192,7 @@ export declare class NavigationError extends RouterEvent {
|
|||
toString(): string;
|
||||
}
|
||||
|
||||
export interface NavigationExtras {
|
||||
export declare interface NavigationExtras {
|
||||
fragment?: string;
|
||||
preserveFragment?: boolean;
|
||||
/** @deprecated */ preserveQueryParams?: boolean;
|
||||
|
@ -235,7 +235,7 @@ export declare class OutletContext {
|
|||
route: ActivatedRoute | null;
|
||||
}
|
||||
|
||||
export interface ParamMap {
|
||||
export declare interface ParamMap {
|
||||
readonly keys: string[];
|
||||
get(name: string): string | null;
|
||||
getAll(name: string): string[];
|
||||
|
@ -260,7 +260,7 @@ export declare function provideRoutes(routes: Routes): any;
|
|||
|
||||
export declare type QueryParamsHandling = 'merge' | 'preserve' | '';
|
||||
|
||||
export interface Resolve<T> {
|
||||
export declare interface Resolve<T> {
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T> | Promise<T> | T;
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ export declare class ResolveStart extends RouterEvent {
|
|||
toString(): string;
|
||||
}
|
||||
|
||||
export interface Route {
|
||||
export declare interface Route {
|
||||
canActivate?: any[];
|
||||
canActivateChild?: any[];
|
||||
canDeactivate?: any[];
|
||||
|
@ -456,12 +456,12 @@ export declare class RouterPreloader implements OnDestroy {
|
|||
setUpPreloading(): void;
|
||||
}
|
||||
|
||||
export declare class RouterState extends Tree<ActivatedRoute> {
|
||||
export declare class RouterState extends ɵangular_packages_router_router_m<ActivatedRoute> {
|
||||
snapshot: RouterStateSnapshot;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
|
||||
export declare class RouterStateSnapshot extends ɵangular_packages_router_router_m<ActivatedRouteSnapshot> {
|
||||
url: string;
|
||||
toString(): string;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
export interface AssetGroup {
|
||||
export declare interface AssetGroup {
|
||||
installMode?: 'prefetch' | 'lazy';
|
||||
name: string;
|
||||
resources: {
|
||||
|
@ -8,7 +8,7 @@ export interface AssetGroup {
|
|||
updateMode?: 'prefetch' | 'lazy';
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
export declare interface Config {
|
||||
appData?: {};
|
||||
assetGroups?: AssetGroup[];
|
||||
dataGroups?: DataGroup[];
|
||||
|
@ -16,7 +16,7 @@ export interface Config {
|
|||
navigationUrls?: string[];
|
||||
}
|
||||
|
||||
export interface DataGroup {
|
||||
export declare interface DataGroup {
|
||||
cacheConfig: {
|
||||
maxSize: number;
|
||||
maxAge: Duration;
|
||||
|
@ -30,7 +30,7 @@ export interface DataGroup {
|
|||
|
||||
export declare type Duration = string;
|
||||
|
||||
export interface Filesystem {
|
||||
export declare interface Filesystem {
|
||||
hash(file: string): Promise<string>;
|
||||
list(dir: string): Promise<string[]>;
|
||||
read(file: string): Promise<string>;
|
|
@ -12,7 +12,7 @@ export declare class SwPush {
|
|||
};
|
||||
}>;
|
||||
readonly subscription: Observable<PushSubscription | null>;
|
||||
constructor(sw: NgswCommChannel);
|
||||
constructor(sw: ɵangular_packages_service_worker_service_worker_a);
|
||||
requestSubscription(options: {
|
||||
serverPublicKey: string;
|
||||
}): Promise<PushSubscription>;
|
||||
|
@ -29,12 +29,12 @@ export declare class SwUpdate {
|
|||
readonly activated: Observable<UpdateActivatedEvent>;
|
||||
readonly available: Observable<UpdateAvailableEvent>;
|
||||
get isEnabled(): boolean;
|
||||
constructor(sw: NgswCommChannel);
|
||||
constructor(sw: ɵangular_packages_service_worker_service_worker_a);
|
||||
activateUpdate(): Promise<void>;
|
||||
checkForUpdate(): Promise<void>;
|
||||
}
|
||||
|
||||
export interface UpdateActivatedEvent {
|
||||
export declare interface UpdateActivatedEvent {
|
||||
current: {
|
||||
hash: string;
|
||||
appData?: Object;
|
||||
|
@ -46,7 +46,7 @@ export interface UpdateActivatedEvent {
|
|||
type: 'UPDATE_ACTIVATED';
|
||||
}
|
||||
|
||||
export interface UpdateAvailableEvent {
|
||||
export declare interface UpdateAvailableEvent {
|
||||
available: {
|
||||
hash: string;
|
||||
appData?: Object;
|
|
@ -32,7 +32,9 @@
|
|||
"circleci-win-ve": "bazel test --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only,-browser:chromium-local //packages/compiler-cli/... //tools/ts-api-guardian/...",
|
||||
"circleci-win-ivy": "bazel test --config=ivy --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot,-browser:chromium-local //packages/compiler-cli/... //tools/ts-api-guardian/...",
|
||||
"lint": "yarn -s tslint && yarn gulp lint",
|
||||
"tslint": "tsc -p tools/tsconfig.json && tslint -c tslint.json \"+(packages|modules|scripts|tools)/**/*.+(js|ts)\""
|
||||
"tslint": "tsc -p tools/tsconfig.json && tslint -c tslint.json \"+(packages|modules|scripts|tools)/**/*.+(js|ts)\"",
|
||||
"public-api:check": "node goldens/public-api/manage.js test",
|
||||
"public-api:update": "node goldens/public-api/manage.js accept"
|
||||
},
|
||||
"// 1": "dependencies are used locally and by bazel",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -39,3 +39,13 @@ ng_package(
|
|||
"//packages/animations/browser/testing",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "animations_api",
|
||||
actualDir = "packages/animations/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/animations",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -51,3 +51,13 @@ ng_package(
|
|||
"//packages/common/upgrade",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "common_api",
|
||||
actualDir = "packages/common/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/common",
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
|
||||
load("//tools:defaults.bzl", "pkg_npm", "ts_api_guardian_test", "ts_library")
|
||||
load("@npm_bazel_typescript//:index.bzl", "ts_config")
|
||||
|
||||
ts_config(
|
||||
|
@ -59,3 +59,23 @@ pkg_npm(
|
|||
"//packages/compiler-cli/ngcc",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test(
|
||||
name = "error_code_api",
|
||||
actual = "packages/compiler-cli/npm_package/src/ngtsc/diagnostics/src/error_code.d.ts",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
golden = "goldens/public-api/compiler-cli/error_code.d.ts",
|
||||
)
|
||||
|
||||
ts_api_guardian_test(
|
||||
name = "compiler_options_api",
|
||||
actual = "packages/compiler-cli/npm_package/src/ngtsc/core/api/src/public_options.d.ts",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
golden = "goldens/public-api/compiler-cli/compiler_options.d.ts",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -54,3 +54,23 @@ ng_package(
|
|||
"//packages/core/testing",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "core_api",
|
||||
actualDir = "packages/core/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/core",
|
||||
)
|
||||
|
||||
ts_api_guardian_test(
|
||||
name = "ng_global_utils_api",
|
||||
actual = "packages/core/src/render3/global_utils_api.d.ts",
|
||||
data = [
|
||||
"//goldens:public-api",
|
||||
"//packages/core",
|
||||
],
|
||||
golden = "goldens/public-api/core/global_utils.d.ts",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -37,3 +37,13 @@ ng_package(
|
|||
":elements",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "elements_api",
|
||||
actualDir = "packages/elements/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/elements",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -37,3 +37,13 @@ ng_package(
|
|||
":forms",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "forms_api",
|
||||
actualDir = "packages/forms/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/forms",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -42,3 +42,13 @@ ng_package(
|
|||
"//packages/http/testing",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "http_api",
|
||||
actualDir = "packages/http/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/http",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_package", "ts_library")
|
||||
load("//tools:defaults.bzl", "ng_package", "ts_api_guardian_test_npm_package", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -36,3 +36,13 @@ ng_package(
|
|||
"//packages/localize/init",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "localize_api",
|
||||
actualDir = "packages/localize/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/localize",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -40,3 +40,13 @@ ng_package(
|
|||
"//packages/platform-browser-dynamic/testing",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "platform-browser-dynamic_api",
|
||||
actualDir = "packages/platform-browser-dynamic/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/platform-browser-dynamic",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -43,3 +43,13 @@ ng_package(
|
|||
"//packages/platform-browser/testing",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "platform-browser_api",
|
||||
actualDir = "packages/platform-browser/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/platform-browser",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -46,3 +46,13 @@ ng_package(
|
|||
"//packages/platform-server/testing",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "platform-server_api",
|
||||
actualDir = "packages/platform-server/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/platform-server",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -31,3 +31,13 @@ ng_package(
|
|||
visibility = ["//integration:__pkg__"],
|
||||
deps = [":platform-webworker-dynamic"],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "platform-webworker-dynamic_api",
|
||||
actualDir = "packages/platform-webworker-dynamic/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/platform-webworker-dynamic",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -37,3 +37,13 @@ ng_package(
|
|||
":platform-webworker",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "platform-webworker_api",
|
||||
actualDir = "packages/platform-webworker/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/platform-webworker",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -43,3 +43,13 @@ ng_package(
|
|||
"//packages/router/upgrade",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "router_api",
|
||||
actualDir = "packages/router/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/router",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -58,3 +58,13 @@ ng_package(
|
|||
"//packages/service-worker/config",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "service-worker_api",
|
||||
actualDir = "packages/service-worker/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/service-worker",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
@ -38,3 +38,13 @@ ng_package(
|
|||
"//packages/upgrade/static/testing",
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test_npm_package(
|
||||
name = "upgrade_api",
|
||||
actualDir = "packages/upgrade/npm_package",
|
||||
data = [
|
||||
":npm_package",
|
||||
"//goldens:public-api",
|
||||
],
|
||||
goldenDir = "goldens/public-api/upgrade",
|
||||
)
|
||||
|
|
|
@ -12,6 +12,7 @@ load("@npm//typescript:index.bzl", "tsc")
|
|||
load("//packages/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_package")
|
||||
load("//tools/ng_rollup_bundle:ng_rollup_bundle.bzl", _ng_rollup_bundle = "ng_rollup_bundle")
|
||||
load("//tools:ng_benchmark.bzl", _ng_benchmark = "ng_benchmark")
|
||||
load("//tools/ts-api-guardian:index.bzl", _ts_api_guardian_test = "ts_api_guardian_test", _ts_api_guardian_test_npm_package = "ts_api_guardian_test_npm_package")
|
||||
|
||||
_DEFAULT_TSCONFIG_TEST = "//packages:tsconfig-test"
|
||||
_INTERNAL_NG_MODULE_API_EXTRACTOR = "//packages/bazel/src/api-extractor:api_extractor"
|
||||
|
@ -459,3 +460,19 @@ def rollup_bundle(name, testonly = False, sourcemap = "true", **kwargs):
|
|||
)
|
||||
terser_minified(name = name + ".min.es5umd", testonly = testonly, src = name + ".es5umd", **common_terser_args)
|
||||
native.filegroup(name = name + ".min.es5umd.js", testonly = testonly, srcs = [name + ".min.es5umd"])
|
||||
|
||||
def ts_api_guardian_test(**kwargs):
|
||||
_ts_api_guardian_test(
|
||||
tags = [
|
||||
"fixme-ivy-aot",
|
||||
],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def ts_api_guardian_test_npm_package(**kwargs):
|
||||
_ts_api_guardian_test_npm_package(
|
||||
tags = [
|
||||
"fixme-ivy-aot",
|
||||
],
|
||||
**kwargs
|
||||
)
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
load("//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
|
||||
load(":public_api_guard.bzl", "generate_targets")
|
||||
|
||||
generate_targets(golden_files = glob(
|
||||
["*/**/*.d.ts"],
|
||||
# exclude the following target because we have an explicit target for it bellow, see :core_api, etc
|
||||
exclude = [
|
||||
"core/core.d.ts",
|
||||
"upgrade/upgrade.d.ts",
|
||||
"upgrade/static.d.ts",
|
||||
],
|
||||
))
|
||||
|
||||
# Explicit target because core is broken down into sub-packages.
|
||||
# The ts_api_guardian rule does not know how to collect the .d.ts files from the sub-packages so we have to list it here explicitly.
|
||||
# see: https://github.com/angular/angular/issues/28057
|
||||
ts_api_guardian_test(
|
||||
name = "core_api",
|
||||
actual = "angular/packages/core/core.d.ts",
|
||||
data = ["//tools/public_api_guard:core/core.d.ts"] + [
|
||||
"//packages/core",
|
||||
"//packages/core/src/di/interface",
|
||||
"//packages/core/src/interface",
|
||||
"//packages/core/src/util",
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/core/core.d.ts",
|
||||
tags = [
|
||||
"fixme-ivy-aot", # ivy no longer emits generated index file
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test(
|
||||
name = "upgrade_api",
|
||||
actual = "angular/packages/upgrade/upgrade.d.ts",
|
||||
data = ["//tools/public_api_guard:upgrade/upgrade.d.ts"] + [
|
||||
"//packages/upgrade",
|
||||
"//packages/upgrade/src/common",
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/upgrade/upgrade.d.ts",
|
||||
tags = [
|
||||
"fixme-ivy-aot", # ivy no longer emits generated index file
|
||||
],
|
||||
)
|
||||
|
||||
ts_api_guardian_test(
|
||||
name = "upgrade_static_api",
|
||||
actual = "angular/packages/upgrade/static/index.d.ts",
|
||||
data = ["//tools/public_api_guard:upgrade/static.d.ts"] + [
|
||||
"//packages/upgrade/static",
|
||||
"//packages/upgrade/src/common",
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/upgrade/static.d.ts",
|
||||
tags = [
|
||||
"fixme-ivy-aot", # ivy no longer emits generated index file
|
||||
],
|
||||
)
|
||||
|
||||
# explicit target because the d.ts file is nested in the core and not part of typical public d.ts api
|
||||
ts_api_guardian_test(
|
||||
name = "ng_global_utils_api",
|
||||
actual = "angular/packages/core/src/render3/global_utils_api.d.ts",
|
||||
data = [
|
||||
":global_utils.d.ts",
|
||||
"//packages/core",
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/global_utils.d.ts",
|
||||
)
|
||||
|
||||
# explicit target because the d.ts file is nested in the compiler and not part of typical public
|
||||
# d.ts api
|
||||
ts_api_guardian_test(
|
||||
name = "error_code_api",
|
||||
actual = "angular/packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.d.ts",
|
||||
data = [
|
||||
":error_code.d.ts",
|
||||
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/error_code.d.ts",
|
||||
)
|
||||
|
||||
# explicit target because the d.ts file is nested in the compiler and not part of typical public
|
||||
# d.ts api
|
||||
ts_api_guardian_test(
|
||||
name = "compiler_options_api",
|
||||
actual = "angular/packages/compiler-cli/src/ngtsc/core/api/src/public_options.d.ts",
|
||||
data = [
|
||||
":compiler_options.d.ts",
|
||||
"//packages/compiler-cli/src/ngtsc/core:api",
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/compiler_options.d.ts",
|
||||
)
|
|
@ -1,32 +0,0 @@
|
|||
# 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
|
||||
|
||||
"""public_api_guard bazel target generator
|
||||
"""
|
||||
|
||||
load("//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
|
||||
|
||||
def generate_targets(golden_files):
|
||||
"""Generates a list of targets to check based on the golden files passed in.
|
||||
"""
|
||||
for golden_file in golden_files:
|
||||
entry_point = golden_file[:-len(".d.ts")]
|
||||
[package_name, entry_point_tail] = entry_point.split("/", 1)
|
||||
directory_name = entry_point_tail.split("/")[-1]
|
||||
target_suffix = "/" + entry_point_tail if package_name != entry_point_tail else ""
|
||||
actual_file = "angular/packages/%s%s/%s.d.ts" % (package_name, target_suffix, directory_name)
|
||||
label_name = package_name + target_suffix.replace("/", "_")
|
||||
|
||||
ts_api_guardian_test(
|
||||
name = "%s_api" % label_name,
|
||||
actual = actual_file,
|
||||
data = [golden_file] + [
|
||||
"//packages/%s:%s" % (package_name + target_suffix, directory_name),
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/%s" % golden_file,
|
||||
tags = [
|
||||
"fixme-ivy-aot", # ivy no longer emits generated index file
|
||||
],
|
||||
)
|
|
@ -62,6 +62,7 @@ def ts_api_guardian_test(
|
|||
name = name,
|
||||
data = data,
|
||||
entry_point = "@angular//tools/ts-api-guardian:bin/ts-api-guardian",
|
||||
tags = kwargs.pop("tags", []) + ["api_guard"],
|
||||
templated_args = args + ["--verify", golden, actual],
|
||||
**kwargs
|
||||
)
|
||||
|
@ -71,6 +72,7 @@ def ts_api_guardian_test(
|
|||
testonly = True,
|
||||
data = data,
|
||||
entry_point = "@angular//tools/ts-api-guardian:bin/ts-api-guardian",
|
||||
tags = kwargs.pop("tags", []) + ["api_guard"],
|
||||
templated_args = args + ["--out", golden, actual],
|
||||
**kwargs
|
||||
)
|
||||
|
@ -120,8 +122,8 @@ def ts_api_guardian_test_npm_package(
|
|||
name = name,
|
||||
data = data,
|
||||
entry_point = "@angular//tools/ts-api-guardian:bin/ts-api-guardian",
|
||||
templated_args = args + ["--verifyDir", goldenDir, "--rootDir", actualDir],
|
||||
tags = ["api_guard"],
|
||||
tags = kwargs.pop("tags", []) + ["api_guard"],
|
||||
templated_args = args + ["--autoDiscoverEntrypoints", "--verifyDir", goldenDir, "--rootDir", actualDir],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
@ -130,7 +132,7 @@ def ts_api_guardian_test_npm_package(
|
|||
testonly = True,
|
||||
data = data,
|
||||
entry_point = "@angular//tools/ts-api-guardian:bin/ts-api-guardian",
|
||||
templated_args = args + ["--outDir", goldenDir, "--rootDir", actualDir],
|
||||
tags = ["api_guard"],
|
||||
tags = kwargs.pop("tags", []) + ["api_guard"],
|
||||
templated_args = args + ["--autoDiscoverEntrypoints", "--outDir", goldenDir, "--rootDir", actualDir],
|
||||
**kwargs
|
||||
)
|
||||
|
|
|
@ -57,7 +57,7 @@ function ensureDirectory(dir: string) {
|
|||
*/
|
||||
function isDirectory(dirPath: string) {
|
||||
try {
|
||||
fs.lstatSync(dirPath).isDirectory();
|
||||
return fs.lstatSync(dirPath).isDirectory();
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue