Skip to content

Commit 035233f

Browse files
committed
fix(dts-generator): escape @types in TSDoc to fix api-extractor report
1 parent 1af9d6f commit 035233f

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

‎packages/dts-generator/api-report/dts-generator.api.md‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,11 @@
44
55
```ts
66

7-
import type { FunctionType } from './ast.d.ts';
7+
import { ApiJSON } from './types/api-json.js';
8+
import { ConcreteSymbol } from './types/api-json.js';
89
import ts from 'typescript';
9-
import type { TypeReference } from './ast.d.ts';
1010

11-
// @public
12-
export type ApiJSON = {
13-
library: string;
14-
version: string;
15-
symbols: ConcreteSymbol[];
16-
};
11+
export { ApiJSON }
1712

1813
// @public
1914
export function checkCompile(options: CheckCompileConfig): boolean;
@@ -103,6 +98,7 @@ export interface GenerateFromPathsConfig {
10398
apiFile: string;
10499
dependenciesApiPath: string;
105100
dependenciesDTSPathForCheck: string;
101+
// @deprecated (undocumented)
106102
dependenciesTypePackagesForCheck?: string;
107103
directivesPath: string;
108104
generateGlobals?: boolean;
@@ -120,10 +116,6 @@ export const ModuleResolutionKind: typeof ts.ModuleResolutionKind;
120116
// @public (undocumented)
121117
export const ScriptTarget: typeof ts.ScriptTarget;
122118

123-
// Warnings were encountered during analysis:
124-
//
125-
// dist/types/api-json.d.ts:13:3 - (ae-forgotten-export) The symbol "ConcreteSymbol" needs to be exported by the entry point index.d.ts
126-
127119
// (No @packageDocumentation comment for this package)
128120

129121
```

‎packages/dts-generator/src/generate-from-paths.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface GenerateFromPathsConfig {
5656
dependenciesDTSPathForCheck: string;
5757

5858
/**
59-
* @deprecated Since 4.0.3. Declared @types/* dependencies are now auto-discovered
59+
* @deprecated Since 4.0.3. Declared `@types/*` dependencies are now auto-discovered
6060
* from the nearest package.json. This option is still accepted for backward
6161
* compatibility and merges additively with the discovered types.
6262
*/

‎packages/dts-generator/src/generate.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export type GenerateConfig = {
9999
dependencyDTSFilesForCheck: string[];
100100

101101
/**
102-
* @deprecated Since 4.0.3. Declared @types/* dependencies are now auto-discovered
102+
* @deprecated Since 4.0.3. Declared `@types/*` dependencies are now auto-discovered
103103
* from the nearest package.json. This option is still accepted for backward
104104
* compatibility and merges additively with the discovered types.
105105
*/

0 commit comments

Comments
 (0)