Skip to content

Commit

Permalink
build: update goldens to ngtsc output (#17605)
Browse files Browse the repository at this point in the history
We should update our API goldens to be based on the
ngtsc output. This helps us speeding up development
since we don't need to build the packages with NGC
whenever we want to update a golden (cache is usually
ngtsc now since it's the default)

One could argue that we do not want to have the definition
members in the goldens, but we already do have private members
in there too (due to how ts-api-guardian works). It technically
is also correct to have the definition members in there since
selectors, inputs are part of the public API.
  • Loading branch information
devversion authored and mmalerba committed Nov 5, 2019
1 parent 790b53e commit 47fa62f
Show file tree
Hide file tree
Showing 55 changed files with 648 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
- *yarn_install
- *setup_bazel_binary

- run: bazel test tools/public_api_guard/... --define=compile=legacy
- run: bazel test tools/public_api_guard/...

# -----------------------------------------------------------------
# Job that runs the e2e tests with Protractor and Chromium headless
Expand Down
18 changes: 18 additions & 0 deletions tools/public_api_guard/cdk/a11y.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export declare class A11yModule {
static ɵinj: i0.ɵɵInjectorDef<A11yModule>;
static ɵmod: i0.ɵɵNgModuleDefWithMeta<A11yModule, [typeof i1.CdkAriaLive, typeof i2.CdkTrapFocus, typeof i3.CdkMonitorFocus], [typeof i4.CommonModule, typeof i5.PlatformModule, typeof i6.ObserversModule], [typeof i1.CdkAriaLive, typeof i2.CdkTrapFocus, typeof i3.CdkMonitorFocus]>;
}

export declare class ActiveDescendantKeyManager<T> extends ListKeyManager<Highlightable & T> {
Expand All @@ -11,6 +13,8 @@ export declare class AriaDescriber implements OnDestroy {
describe(hostElement: Element, message: string | HTMLElement): void;
ngOnDestroy(): void;
removeDescription(hostElement: Element, message: string | HTMLElement): void;
static ɵfac: i0.ɵɵFactoryDef<AriaDescriber>;
static ɵprov: i0.ɵɵInjectableDef<AriaDescriber>;
}

export declare type AriaLivePoliteness = 'off' | 'polite' | 'assertive';
Expand All @@ -23,12 +27,16 @@ export declare class CdkAriaLive implements OnDestroy {
politeness: AriaLivePoliteness;
constructor(_elementRef: ElementRef, _liveAnnouncer: LiveAnnouncer, _contentObserver: ContentObserver, _ngZone: NgZone);
ngOnDestroy(): void;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkAriaLive, "[cdkAriaLive]", ["cdkAriaLive"], { 'politeness': "cdkAriaLive" }, {}, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkAriaLive>;
}

export declare class CdkMonitorFocus implements OnDestroy {
cdkFocusChange: EventEmitter<FocusOrigin>;
constructor(_elementRef: ElementRef<HTMLElement>, _focusMonitor: FocusMonitor);
ngOnDestroy(): void;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkMonitorFocus, "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", never, {}, { 'cdkFocusChange': "cdkFocusChange" }, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkMonitorFocus>;
}

export declare class CdkTrapFocus implements OnDestroy, AfterContentInit, DoCheck {
Expand All @@ -41,6 +49,8 @@ export declare class CdkTrapFocus implements OnDestroy, AfterContentInit, DoChec
ngOnDestroy(): void;
static ngAcceptInputType_autoCapture: boolean | string;
static ngAcceptInputType_enabled: boolean | string;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkTrapFocus, "[cdkTrapFocus]", ["cdkTrapFocus"], { 'enabled': "cdkTrapFocus", 'autoCapture': "cdkTrapFocusAutoCapture" }, {}, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkTrapFocus>;
}

export interface FocusableOption extends ListKeyManagerOption {
Expand All @@ -63,6 +73,8 @@ export declare class FocusMonitor implements OnDestroy {
ngOnDestroy(): void;
stopMonitoring(element: HTMLElement): void;
stopMonitoring(element: ElementRef<HTMLElement>): void;
static ɵfac: i0.ɵɵFactoryDef<FocusMonitor>;
static ɵprov: i0.ɵɵInjectableDef<FocusMonitor>;
}

export interface FocusOptions {
Expand Down Expand Up @@ -90,6 +102,8 @@ export declare class FocusTrap {
export declare class FocusTrapFactory {
constructor(_checker: InteractivityChecker, _ngZone: NgZone, _document: any);
create(element: HTMLElement, deferCaptureElements?: boolean): FocusTrap;
static ɵfac: i0.ɵɵFactoryDef<FocusTrapFactory>;
static ɵprov: i0.ɵɵInjectableDef<FocusTrapFactory>;
}

export interface Highlightable extends ListKeyManagerOption {
Expand All @@ -103,6 +117,8 @@ export declare class InteractivityChecker {
isFocusable(element: HTMLElement): boolean;
isTabbable(element: HTMLElement): boolean;
isVisible(element: HTMLElement): boolean;
static ɵfac: i0.ɵɵFactoryDef<InteractivityChecker>;
static ɵprov: i0.ɵɵInjectableDef<InteractivityChecker>;
}

export declare function isFakeMousedownFromScreenReader(event: MouseEvent): boolean;
Expand Down Expand Up @@ -151,6 +167,8 @@ export declare class LiveAnnouncer implements OnDestroy {
announce(message: string, politeness?: AriaLivePoliteness, duration?: number): Promise<void>;
clear(): void;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDef<LiveAnnouncer>;
static ɵprov: i0.ɵɵInjectableDef<LiveAnnouncer>;
}

export interface LiveAnnouncerDefaultOptions {
Expand Down
6 changes: 6 additions & 0 deletions tools/public_api_guard/cdk/accordion.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export declare class CdkAccordion implements OnDestroy, OnChanges {
ngOnDestroy(): void;
openAll(): void;
static ngAcceptInputType_multi: boolean | string;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkAccordion, "cdk-accordion, [cdkAccordion]", ["cdkAccordion"], { 'multi': "multi" }, {}, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkAccordion>;
}

export declare class CdkAccordionItem implements OnDestroy {
Expand All @@ -27,7 +29,11 @@ export declare class CdkAccordionItem implements OnDestroy {
toggle(): void;
static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_expanded: boolean | string;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkAccordionItem, "cdk-accordion-item, [cdkAccordionItem]", ["cdkAccordionItem"], { 'expanded': "expanded", 'disabled': "disabled" }, { 'closed': "closed", 'opened': "opened", 'destroyed': "destroyed", 'expandedChange': "expandedChange" }, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkAccordionItem>;
}

export declare class CdkAccordionModule {
static ɵinj: i0.ɵɵInjectorDef<CdkAccordionModule>;
static ɵmod: i0.ɵɵNgModuleDefWithMeta<CdkAccordionModule, [typeof i1.CdkAccordion, typeof i2.CdkAccordionItem], never, [typeof i1.CdkAccordion, typeof i2.CdkAccordionItem]>;
}
6 changes: 6 additions & 0 deletions tools/public_api_guard/cdk/bidi.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export declare class BidiModule {
static ɵinj: i0.ɵɵInjectorDef<BidiModule>;
static ɵmod: i0.ɵɵNgModuleDefWithMeta<BidiModule, [typeof i1.Dir], never, [typeof i1.Dir]>;
}

export declare class Dir implements Directionality, AfterContentInit, OnDestroy {
Expand All @@ -8,6 +10,8 @@ export declare class Dir implements Directionality, AfterContentInit, OnDestroy
readonly value: Direction;
ngAfterContentInit(): void;
ngOnDestroy(): void;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<Dir, "[dir]", ["dir"], { 'dir': "dir" }, { 'change': "dirChange" }, never>;
static ɵfac: i0.ɵɵFactoryDef<Dir>;
}

export declare const DIR_DOCUMENT: InjectionToken<Document>;
Expand All @@ -19,4 +23,6 @@ export declare class Directionality implements OnDestroy {
readonly value: Direction;
constructor(_document?: any);
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDef<Directionality>;
static ɵprov: i0.ɵɵInjectableDef<Directionality>;
}
6 changes: 6 additions & 0 deletions tools/public_api_guard/cdk/clipboard.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ export declare class CdkCopyToClipboard {
text: string;
constructor(_clipboard: Clipboard);
copy(): void;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkCopyToClipboard, "[cdkCopyToClipboard]", never, { 'text': "cdkCopyToClipboard" }, { 'copied': "copied" }, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkCopyToClipboard>;
}

export declare class Clipboard {
constructor(document: any);
beginCopy(text: string): PendingCopy;
copy(text: string): boolean;
static ɵfac: i0.ɵɵFactoryDef<Clipboard>;
static ɵprov: i0.ɵɵInjectableDef<Clipboard>;
}

export declare class ClipboardModule {
static ɵinj: i0.ɵɵInjectorDef<ClipboardModule>;
static ɵmod: i0.ɵɵNgModuleDefWithMeta<ClipboardModule, [typeof i1.CdkCopyToClipboard], [typeof i2.CommonModule], [typeof i1.CdkCopyToClipboard]>;
}

export declare class PendingCopy {
Expand Down
2 changes: 2 additions & 0 deletions tools/public_api_guard/cdk/collections.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export declare class UniqueSelectionDispatcher implements OnDestroy {
listen(listener: UniqueSelectionDispatcherListener): () => void;
ngOnDestroy(): void;
notify(id: string, name: string): void;
static ɵfac: i0.ɵɵFactoryDef<UniqueSelectionDispatcher>;
static ɵprov: i0.ɵɵInjectableDef<UniqueSelectionDispatcher>;
}

export declare type UniqueSelectionDispatcherListener = (id: string, name: string) => void;
18 changes: 18 additions & 0 deletions tools/public_api_guard/cdk/drag-drop.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export declare class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDes
ngOnDestroy(): void;
reset(): void;
static ngAcceptInputType_disabled: boolean | string;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkDrag<any>, "[cdkDrag]", ["cdkDrag"], { 'data': "cdkDragData", 'lockAxis': "cdkDragLockAxis", 'rootElementSelector': "cdkDragRootElement", 'boundaryElement': "cdkDragBoundary", 'dragStartDelay': "cdkDragStartDelay", 'freeDragPosition': "cdkDragFreeDragPosition", 'disabled': "cdkDragDisabled", 'constrainPosition': "cdkDragConstrainPosition", 'previewClass': "cdkDragPreviewClass" }, { 'started': "cdkDragStarted", 'released': "cdkDragReleased", 'ended': "cdkDragEnded", 'entered': "cdkDragEntered", 'exited': "cdkDragExited", 'dropped': "cdkDragDropped", 'moved': "cdkDragMoved" }, ["_previewTemplate", "_placeholderTemplate", "_handles"]>;
static ɵfac: i0.ɵɵFactoryDef<CdkDrag<any>>;
}

export interface CdkDragDrop<T, O = T> {
Expand Down Expand Up @@ -89,6 +91,8 @@ export declare class CdkDragHandle implements OnDestroy {
constructor(element: ElementRef<HTMLElement>, parentDrag?: any);
ngOnDestroy(): void;
static ngAcceptInputType_disabled: boolean | string;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkDragHandle, "[cdkDragHandle]", never, { 'disabled': "cdkDragHandleDisabled" }, {}, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkDragHandle>;
}

export interface CdkDragMove<T = any> {
Expand All @@ -112,12 +116,16 @@ export declare class CdkDragPlaceholder<T = any> {
data: T;
templateRef: TemplateRef<T>;
constructor(templateRef: TemplateRef<T>);
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkDragPlaceholder<any>, "ng-template[cdkDragPlaceholder]", never, { 'data': "data" }, {}, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkDragPlaceholder<any>>;
}

export declare class CdkDragPreview<T = any> {
data: T;
templateRef: TemplateRef<T>;
constructor(templateRef: TemplateRef<T>);
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkDragPreview<any>, "ng-template[cdkDragPreview]", never, { 'data': "data" }, {}, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkDragPreview<any>>;
}

export interface CdkDragRelease<T = any> {
Expand Down Expand Up @@ -164,13 +172,17 @@ export declare class CdkDropList<T = any> implements AfterContentInit, OnDestroy
static ngAcceptInputType_autoScrollDisabled: boolean | string;
static ngAcceptInputType_disabled: boolean | string;
static ngAcceptInputType_sortingDisabled: boolean | string;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkDropList<any>, "[cdkDropList], cdk-drop-list", ["cdkDropList"], { 'connectedTo': "cdkDropListConnectedTo", 'data': "cdkDropListData", 'orientation': "cdkDropListOrientation", 'id': "id", 'lockAxis': "cdkDropListLockAxis", 'disabled': "cdkDropListDisabled", 'sortingDisabled': "cdkDropListSortingDisabled", 'enterPredicate': "cdkDropListEnterPredicate", 'autoScrollDisabled': "cdkDropListAutoScrollDisabled" }, { 'dropped': "cdkDropListDropped", 'entered': "cdkDropListEntered", 'exited': "cdkDropListExited", 'sorted': "cdkDropListSorted" }, ["_draggables"]>;
static ɵfac: i0.ɵɵFactoryDef<CdkDropList<any>>;
}

export declare class CdkDropListGroup<T> implements OnDestroy {
readonly _items: Set<T>;
disabled: boolean;
ngOnDestroy(): void;
static ngAcceptInputType_disabled: boolean | string;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkDropListGroup<any>, "[cdkDropListGroup]", ["cdkDropListGroup"], { 'disabled': "cdkDropListGroupDisabled" }, {}, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkDropListGroup<any>>;
}

export declare function copyArrayItem<T = any>(currentArray: T[], targetArray: T[], currentIndex: number, targetIndex: number): void;
Expand All @@ -179,9 +191,13 @@ export declare class DragDrop {
constructor(_document: any, _ngZone: NgZone, _viewportRuler: ViewportRuler, _dragDropRegistry: DragDropRegistry<DragRef, DropListRef>);
createDrag<T = any>(element: ElementRef<HTMLElement> | HTMLElement, config?: DragRefConfig): DragRef<T>;
createDropList<T = any>(element: ElementRef<HTMLElement> | HTMLElement): DropListRef<T>;
static ɵfac: i0.ɵɵFactoryDef<DragDrop>;
static ɵprov: i0.ɵɵInjectableDef<DragDrop>;
}

export declare class DragDropModule {
static ɵinj: i0.ɵɵInjectorDef<DragDropModule>;
static ɵmod: i0.ɵɵNgModuleDefWithMeta<DragDropModule, [typeof i1.CdkDropList, typeof i2.CdkDropListGroup, typeof i3.CdkDrag, typeof i4.CdkDragHandle, typeof i5.CdkDragPreview, typeof i6.CdkDragPlaceholder], never, [typeof i1.CdkDropList, typeof i2.CdkDropListGroup, typeof i3.CdkDrag, typeof i4.CdkDragHandle, typeof i5.CdkDragPreview, typeof i6.CdkDragPlaceholder]>;
}

export declare class DragDropRegistry<I, C> implements OnDestroy {
Expand All @@ -197,6 +213,8 @@ export declare class DragDropRegistry<I, C> implements OnDestroy {
removeDropContainer(drop: C): void;
startDragging(drag: I, event: TouchEvent | MouseEvent): void;
stopDragging(drag: I): void;
static ɵfac: i0.ɵɵFactoryDef<DragDropRegistry<any, any>>;
static ɵprov: i0.ɵɵInjectableDef<DragDropRegistry<any, any>>;
}

export declare class DragRef<T = any> {
Expand Down
6 changes: 6 additions & 0 deletions tools/public_api_guard/cdk/layout.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export declare class BreakpointObserver implements OnDestroy {
isMatched(value: string | string[]): boolean;
ngOnDestroy(): void;
observe(value: string | string[]): Observable<BreakpointState>;
static ɵfac: i0.ɵɵFactoryDef<BreakpointObserver>;
static ɵprov: i0.ɵɵInjectableDef<BreakpointObserver>;
}

export declare const Breakpoints: {
Expand Down Expand Up @@ -30,9 +32,13 @@ export interface BreakpointState {
}

export declare class LayoutModule {
static ɵinj: i0.ɵɵInjectorDef<LayoutModule>;
static ɵmod: i0.ɵɵNgModuleDefWithMeta<LayoutModule, never, never, never>;
}

export declare class MediaMatcher {
constructor(_platform: Platform);
matchMedia(query: string): MediaQueryList;
static ɵfac: i0.ɵɵFactoryDef<MediaMatcher>;
static ɵprov: i0.ɵɵInjectableDef<MediaMatcher>;
}
8 changes: 8 additions & 0 deletions tools/public_api_guard/cdk/observers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ export declare class CdkObserveContent implements AfterContentInit, OnDestroy {
ngOnDestroy(): void;
static ngAcceptInputType_debounce: boolean | string;
static ngAcceptInputType_disabled: boolean | string;
static ɵdir: i0.ɵɵDirectiveDefWithMeta<CdkObserveContent, "[cdkObserveContent]", ["cdkObserveContent"], { 'disabled': "cdkObserveContentDisabled", 'debounce': "debounce" }, { 'event': "cdkObserveContent" }, never>;
static ɵfac: i0.ɵɵFactoryDef<CdkObserveContent>;
}

export declare class ContentObserver implements OnDestroy {
constructor(_mutationObserverFactory: MutationObserverFactory);
ngOnDestroy(): void;
observe(element: Element): Observable<MutationRecord[]>;
observe(element: ElementRef<Element>): Observable<MutationRecord[]>;
static ɵfac: i0.ɵɵFactoryDef<ContentObserver>;
static ɵprov: i0.ɵɵInjectableDef<ContentObserver>;
}

export declare class MutationObserverFactory {
create(callback: MutationCallback): MutationObserver | null;
static ɵfac: i0.ɵɵFactoryDef<MutationObserverFactory>;
static ɵprov: i0.ɵɵInjectableDef<MutationObserverFactory>;
}

export declare class ObserversModule {
static ɵinj: i0.ɵɵInjectorDef<ObserversModule>;
static ɵmod: i0.ɵɵNgModuleDefWithMeta<ObserversModule, [typeof CdkObserveContent], never, [typeof CdkObserveContent]>;
}
Loading

0 comments on commit 47fa62f

Please sign in to comment.