Skip to content

Commit 55172ac

Browse files
committed
fix(tsc): add a temporary hack to ensure tsc -d works
Bug reported microsoft/TypeScript#17293
1 parent a7991c6 commit 55172ac

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/CreateErrorType.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,22 @@ export const CreateErrorType = <T extends Array<unknown>>(
1010
cm: string | ((...t: T) => string)
1111
) =>
1212
class extends SchedulerError {
13-
private readonly t: T
13+
/**
14+
* FIXME: args should be `private`
15+
* Bug Reported: https://github.com/Microsoft/TypeScript/issues/17293
16+
*/
17+
public readonly args: T
1418

1519
constructor(...args: T) {
1620
super()
17-
this.t = args
21+
this.args = args
1822
}
1923

20-
protected createMessage(): string {
21-
return typeof cm === 'string' ? cm : cm(...this.t)
24+
/**
25+
* FIXME: createMessage could be `private` ???
26+
* Bug Reported: https://github.com/Microsoft/TypeScript/issues/17293
27+
*/
28+
public createMessage(): string {
29+
return typeof cm === 'string' ? cm : cm(...this.args)
2230
}
2331
}

0 commit comments

Comments
 (0)