Skip to content

Commit

Permalink
Move @ts-ignore to a JSDoc comment so it gets preserved after compila…
Browse files Browse the repository at this point in the history
…tion (#2981)
  • Loading branch information
Andarist committed Jan 28, 2022
1 parent e38ee00 commit edf60d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sour-candles-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'xstate': patch
---

Moved an internal `@ts-ignore` to a JSDoc-style comment to fix consuming projects that do not use `skipLibCheck`. Regular inline and block comments are not preserved in the TypeScript's emit.
2 changes: 1 addition & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ export interface HistoryStateNode<TContext> extends StateNode<TContext> {
target: StateValue | undefined;
}

// @ts-ignore TS complains about withConfig & withContext not being compatible here when extending StateNode
/** @ts-ignore TS complains about withConfig & withContext not being compatible here when extending StateNode */
export interface StateMachine<
TContext,
TStateSchema extends StateSchema,
Expand Down

0 comments on commit edf60d6

Please sign in to comment.