Skip to content

Commit

Permalink
Marked all phantom properties on the StateMachine type as deprecated (
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Jan 28, 2022
1 parent edf60d6 commit a391455
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/rich-tips-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'xstate': patch
---

Marked all phantom properties on the `StateMachine` type as deprecated. This deprioritized them in IDEs so they don't popup as first suggestions during property access.
7 changes: 7 additions & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,19 @@ export interface StateMachine<
TResolvedTypesMeta
>;

/** @deprecated an internal property acting as a "phantom" type, not meant to be used at runtime */
__TContext: TContext;
/** @deprecated an internal property acting as a "phantom" type, not meant to be used at runtime */
__TStateSchema: TStateSchema;
/** @deprecated an internal property acting as a "phantom" type, not meant to be used at runtime */
__TEvent: TEvent;
/** @deprecated an internal property acting as a "phantom" type, not meant to be used at runtime */
__TTypestate: TTypestate;
/** @deprecated an internal property acting as a "phantom" type, not meant to be used at runtime */
__TAction: TAction;
/** @deprecated an internal property acting as a "phantom" type, not meant to be used at runtime */
__TServiceMap: TServiceMap;
/** @deprecated an internal property acting as a "phantom" type, not meant to be used at runtime */
__TResolvedTypesMeta: TResolvedTypesMeta;
}

Expand Down

0 comments on commit a391455

Please sign in to comment.