mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
feat(api-extractor): replace type parameters with their actual values on inherited members (#9939)
* refactor: use tokenRange for typeParams in heritage * fix: correct type param replacement
This commit is contained in:
@@ -44,7 +44,7 @@ export interface IApiClassOptions
|
||||
}
|
||||
|
||||
export interface IExcerptTokenRangeWithTypeParameters extends IExcerptTokenRange {
|
||||
typeParameters: string[];
|
||||
typeParameters: IExcerptTokenRange[];
|
||||
}
|
||||
|
||||
export interface IApiClassJson
|
||||
|
||||
@@ -91,13 +91,18 @@ export enum ApiJsonSchemaVersion {
|
||||
*/
|
||||
V_1011 = 1_011,
|
||||
|
||||
/**
|
||||
* Add a `fileLine`and `fileColumn` field to track source code location
|
||||
*/
|
||||
V_1012 = 1_012,
|
||||
|
||||
/**
|
||||
* The current latest .api.json schema version.
|
||||
*
|
||||
* IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE`
|
||||
* should be updated.
|
||||
*/
|
||||
LATEST = V_1011,
|
||||
LATEST = V_1012,
|
||||
|
||||
/**
|
||||
* The oldest .api.json schema version that is still supported for backwards compatibility.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
// See LICENSE in the project root for license information.
|
||||
|
||||
import type { Excerpt } from '../mixins/Excerpt.js';
|
||||
import type { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt.js';
|
||||
|
||||
/**
|
||||
* Represents a type referenced via an "extends" or "implements" heritage clause for a TypeScript class
|
||||
@@ -38,9 +38,9 @@ export class HeritageType {
|
||||
*/
|
||||
public readonly excerpt: Excerpt;
|
||||
|
||||
public readonly typeParameters?: string[];
|
||||
public readonly typeParameters?: IExcerptTokenRange[];
|
||||
|
||||
public constructor(excerpt: Excerpt, typeParameters: string[]) {
|
||||
public constructor(excerpt: Excerpt, typeParameters: IExcerptTokenRange[]) {
|
||||
this.excerpt = excerpt;
|
||||
this.typeParameters = typeParameters;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user