Skip to content

Commit

Permalink
refactor: rename typescriptLocale to locale
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jul 9, 2023
1 parent 58a86cb commit 44d6665
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/monaco/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function loadMonacoEnv(store: Store) {
worker.postMessage({
event: 'init',
tsVersion: store.state.typescriptVersion,
tsLocale: store.state.typescriptLocale,
tsLocale: store.state.typescriptLocale || store.state.locale,
} satisfies WorkerMessage)
})
await init
Expand Down
5 changes: 4 additions & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export interface StoreState {
vueRuntimeURL: string
vueServerRendererURL: string
typescriptVersion: string
typescriptLocale: string | undefined
/** @deprecated use `locale` instead */
typescriptLocale?: string | undefined
locale?: string | undefined
// used to force reset the sandbox
resetFlip: boolean
}
Expand Down Expand Up @@ -191,6 +193,7 @@ export class ReplStore implements Store {
this.state.files[tsconfigFile]?.code,
this.state.typescriptVersion,
this.state.typescriptLocale,
this.state.locale,
],
() => this.reloadLanguageTools?.()
)
Expand Down

0 comments on commit 44d6665

Please sign in to comment.