Skip to content

Commit 01d92eb

Browse files
committed
Export IApiItemConstructor to eliminate the ae-forgotten-export warning
1 parent dcaaae5 commit 01d92eb

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

apps/api-extractor-model/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export {
2424
export {
2525
ApiItemKind,
2626
IApiItemOptions,
27-
ApiItem
27+
ApiItem,
28+
IApiItemConstructor
2829
} from './items/ApiItem';
2930
export {
3031
IApiPropertyItemOptions,

apps/api-extractor-model/src/items/ApiItem.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,10 @@ export class ApiItem {
194194
}
195195
}
196196

197-
// For mixins
197+
/**
198+
* This abstraction is used by the mixin pattern.
199+
* It describes a class type that inherits from {@link ApiItem}.
200+
*
201+
* @public
202+
*/
198203
export interface IApiItemConstructor extends Constructor<ApiItem>, PropertiesOf<typeof ApiItem> { }

apps/api-extractor-model/src/mixins/Mixin.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
// See LICENSE in the project root for license information.
33

44
/**
5+
* This abstraction is used by the mixin pattern.
6+
* It describes a class constructor.
57
* @public
68
*/
79
export type Constructor<T = {}> = new (...args: any[]) => T; // tslint:disable-line:no-any
810

911
/**
12+
* This abstraction is used by the mixin pattern.
13+
* It describes the "static side" of a class.
14+
*
1015
* @public
1116
*/
1217
export type PropertiesOf<T> = { [K in keyof T]: T[K] };
13-
14-
export type Mixin<TBase, TMixin> = TBase & Constructor<TMixin>;

common/reviews/api/api-extractor-model.api.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ declare class ApiItem {
241241
serializeInto(jsonObject: Partial<IApiItemJson>): void;
242242
}
243243

244-
// Warning: (ae-forgotten-export) The symbol "IApiItemConstructor" needs to be exported by the entry point index.d.ts
245-
//
246244
// @public
247245
declare function ApiItemContainerMixin<TBaseClass extends IApiItemConstructor>(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiItemContainerMixin);
248246

@@ -530,7 +528,7 @@ declare class ApiVariable extends ApiVariable_base {
530528
readonly variableTypeExcerpt: Excerpt;
531529
}
532530

533-
// @public (undocumented)
531+
// @public
534532
declare type Constructor<T = {}> = new (...args: any[]) => T;
535533

536534
// @public
@@ -632,6 +630,10 @@ interface IApiInterfaceOptions extends IApiItemContainerMixinOptions, IApiNameMi
632630
extendsTokenRanges: IExcerptTokenRange[];
633631
}
634632

633+
// @public
634+
interface IApiItemConstructor extends Constructor<ApiItem>, PropertiesOf<typeof ApiItem> {
635+
}
636+
635637
// @public
636638
interface IApiItemContainerMixinOptions extends IApiItemOptions {
637639
// (undocumented)
@@ -765,7 +767,7 @@ declare class Parameter {
765767
readonly tsdocParamBlock: tsdoc.DocParamBlock | undefined;
766768
}
767769

768-
// @public (undocumented)
770+
// @public
769771
declare type PropertiesOf<T> = {
770772
[K in keyof T]: T[K];
771773
};

0 commit comments

Comments
 (0)