Skip to content

Commit 44d6665

Browse files
committed
refactor: rename typescriptLocale to locale
1 parent 58a86cb commit 44d6665

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/monaco/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function loadMonacoEnv(store: Store) {
161161
worker.postMessage({
162162
event: 'init',
163163
tsVersion: store.state.typescriptVersion,
164-
tsLocale: store.state.typescriptLocale,
164+
tsLocale: store.state.typescriptLocale || store.state.locale,
165165
} satisfies WorkerMessage)
166166
})
167167
await init

src/store.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ export interface StoreState {
8585
vueRuntimeURL: string
8686
vueServerRendererURL: string
8787
typescriptVersion: string
88-
typescriptLocale: string | undefined
88+
/** @deprecated use `locale` instead */
89+
typescriptLocale?: string | undefined
90+
locale?: string | undefined
8991
// used to force reset the sandbox
9092
resetFlip: boolean
9193
}
@@ -191,6 +193,7 @@ export class ReplStore implements Store {
191193
this.state.files[tsconfigFile]?.code,
192194
this.state.typescriptVersion,
193195
this.state.typescriptLocale,
196+
this.state.locale,
194197
],
195198
() => this.reloadLanguageTools?.()
196199
)

0 commit comments

Comments
 (0)