static-injector
Version:
Angular 依赖注入独立版本;Angular dependency injection standalone version
25 lines (24 loc) • 773 B
TypeScript
/**
* @license
* Copyright Google LLC 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.dev/license
*/
/**
* An ES Module object with a default export of the given type.
*
* @see {@link injectAsync}
* @see [Route#loadComponent](/api/router/Route#loadComponent)
* @see [LoadChildrenCallback](/api/router/LoadChildrenCallback)
*
* @publicApi
*/
export interface DefaultExport<T> {
/**
* Default exports are bound under the name `"default"`, per the ES Module spec:
* https://tc39.es/ecma262/#table-export-forms-mapping-to-exportentry-records
*/
default: T;
}
export declare function maybeUnwrapDefaultExport<T>(input: T | DefaultExport<T>): T;