Skip to content

Commit

Permalink
fix(tsc): add a temporary hack to ensure tsc -d works
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Apr 15, 2019
1 parent a7991c6 commit 55172ac
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/CreateErrorType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@ export const CreateErrorType = <T extends Array<unknown>>(
cm: string | ((...t: T) => string)
) =>
class extends SchedulerError {
private readonly t: T
/**
* FIXME: args should be `private`
* Bug Reported: https://github.com/Microsoft/TypeScript/issues/17293
*/
public readonly args: T

constructor(...args: T) {
super()
this.t = args
this.args = args
}

protected createMessage(): string {
return typeof cm === 'string' ? cm : cm(...this.t)
/**
* FIXME: createMessage could be `private` ???
* Bug Reported: https://github.com/Microsoft/TypeScript/issues/17293
*/
public createMessage(): string {
return typeof cm === 'string' ? cm : cm(...this.args)
}
}

0 comments on commit 55172ac

Please sign in to comment.