Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export * from './platform_core_providers';
export {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy} from './i18n/tokens';
export {ApplicationModule} from './application_module';
export {wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn} from './profile/profile';
export {Type} from './interface/type';
export {AbstractType, Type} from './interface/type';
export {EventEmitter} from './event_emitter';
export {ErrorHandler} from './error_handler';
export * from './core_private_export';
Expand Down
10 changes: 10 additions & 0 deletions packages/core/src/interface/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ export function isType(v: any): v is Type<any> {
return typeof v === 'function';
}

/**
* @description
*
* Represents an abstract class `T`, if applied to a concrete class it would stop being
* instantiatable.
*
* @publicApi
*/
export interface AbstractType<T> extends Function { prototype: T; }

export interface Type<T> extends Function { new (...args: any[]): T; }

export type Mutable<T extends{[x: string]: any}, K extends string> = {
Expand Down
4 changes: 4 additions & 0 deletions tools/public_api_guard/core/core.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export interface AbstractType<T> extends Function {
prototype: T;
}

export interface AfterContentChecked {
ngAfterContentChecked(): void;
}
Expand Down