File tree Expand file tree Collapse file tree 4 files changed +19
-8
lines changed
Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ export {
2424export {
2525 ApiItemKind ,
2626 IApiItemOptions ,
27- ApiItem
27+ ApiItem ,
28+ IApiItemConstructor
2829} from './items/ApiItem' ;
2930export {
3031 IApiPropertyItemOptions ,
Original file line number Diff line number Diff 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+ */
198203export interface IApiItemConstructor extends Constructor < ApiItem > , PropertiesOf < typeof ApiItem > { }
Original file line number Diff line number Diff line change 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 */
79export 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 */
1217export type PropertiesOf < T > = { [ K in keyof T ] : T [ K ] } ;
13-
14- export type Mixin < TBase , TMixin > = TBase & Constructor < TMixin > ;
Original file line number Diff line number Diff 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
247245declare 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
534532declare 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
636638interface 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
769771declare type PropertiesOf <T > = {
770772 [K in keyof T ]: T [K ];
771773};
You can’t perform that action at this time.
0 commit comments