Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
fix(types): "Type alias 'RootStoreType' circularly references itself" (
Browse files Browse the repository at this point in the history
…#267 by @ryanlntn)



* Revert changes to withStatus
  • Loading branch information
ryanlntn authored and jamonholmgren committed Oct 14, 2019
1 parent 6f72a4c commit a954c3c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion boilerplate/app/models/extensions/with-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const withEnvironment = (self: IStateTreeNode) => ({
* The environment.
*/
get environment() {
return getEnv(self) as Environment
return getEnv<Environment>(self)
},
},
})
2 changes: 1 addition & 1 deletion boilerplate/app/models/extensions/with-root-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const withRootStore = (self: IStateTreeNode) => ({
* The root store.
*/
get rootStore() {
return getRoot(self) as RootStore
return getRoot<RootStore>(self)
},
},
})
4 changes: 2 additions & 2 deletions boilerplate/app/models/root-store/root-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export const RootStoreModel = types.model("RootStore").props({
/**
* The RootStore instance.
*/
export type RootStore = Instance<typeof RootStoreModel>
export interface RootStore extends Instance<typeof RootStoreModel> {}

/**
* The data of a RootStore.
*/
export type RootStoreSnapshot = SnapshotOut<typeof RootStoreModel>
export interface RootStoreSnapshot extends SnapshotOut<typeof RootStoreModel> {}

0 comments on commit a954c3c

Please sign in to comment.