Skip to content

Commit 67a7f8a

Browse files
committed
Fix TypeScript error TS2742
1 parent f7498b7 commit 67a7f8a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/main.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ export type { CommonInfo } from './plugins/info/main.js'
7979
export type { CustomClass } from './subclass/custom.js'
8080
export type { CreateSubclass, ErrorSubclassCore } from './subclass/create.js'
8181
export type { NormalizeError } from './subclass/normalize.js'
82+
export type { SpecificErrorClass }

src/subclass/create.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ interface ErrorSubclassCore<
132132

133133
/**
134134
* Error class, with specific `props`, `custom`, etc.
135+
*
136+
* @private This type is private and only exported as a temporary workaround
137+
* for an open issue with TypeScript. It will be removed in a future release.
138+
* See:
139+
*
140+
* - [modern-errors issue #35](https://github.com/ehmicky/modern-errors/issues/35)
141+
* - [modern-errors issue #18](https://github.com/ehmicky/modern-errors/issues/18)
142+
* - [TypeScript issue #47663](https://github.com/microsoft/TypeScript/issues/47663)
135143
*/
136144
export type SpecificErrorClass<
137145
PluginsArg extends Plugins,

0 commit comments

Comments
 (0)