File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,17 @@ export interface ITypeParameterOptions {
2626 * `TypeParameter` represents a TypeScript declaration such as `T` in this example:
2727 *
2828 * ```ts
29- * export interface Array<T> {
29+ * interface IIdentifier {
30+ * getCode(): string;
31+ * }
32+ *
33+ * class BarCode implements IIdentifier {
34+ * private _value: number;
35+ * public getCode(): string { return this._value.toString(); }
36+ * }
37+ *
38+ * class Book<TIdentifier extends IIdentifier = BarCode> {
39+ * public identifier: TIdentifier;
3040 * }
3141 * ```
3242 *
@@ -37,11 +47,29 @@ export interface ITypeParameterOptions {
3747export class TypeParameter {
3848 /**
3949 * An {@link Excerpt} that describes the base constraint of the type parameter.
50+ *
51+ * @remarks
52+ * In the example below, the `constraintExcerpt` would correspond to the `IIdentifier` subexpression:
53+ *
54+ * ```ts
55+ * class Book<TIdentifier extends IIdentifier = BarCode> {
56+ * public identifier: TIdentifier;
57+ * }
58+ * ```
4059 */
4160 public readonly constraintExcerpt : Excerpt | undefined ;
4261
4362 /**
4463 * An {@link Excerpt} that describes the default type of the type parameter.
64+ *
65+ * @remarks
66+ * In the example below, the `defaultTypeExcerpt` would correspond to the `BarCode` subexpression:
67+ *
68+ * ```ts
69+ * class Book<TIdentifier extends IIdentifier = BarCode> {
70+ * public identifier: TIdentifier;
71+ * }
72+ * ```
4573 */
4674 public readonly defaultTypeExcerpt : Excerpt | undefined ;
4775
You can’t perform that action at this time.
0 commit comments