|
1 | 1 | import { |
2 | | - isString, |
| 2 | + assign, |
| 3 | + create, |
3 | 4 | isBoolean, |
4 | | - isPlainObject, |
5 | | - isNumber, |
6 | 5 | isEmptyObject, |
7 | | - assign |
| 6 | + isNumber, |
| 7 | + isPlainObject, |
| 8 | + isString |
8 | 9 | } from '@intlify/shared' |
9 | 10 | import { |
10 | 11 | handleMissing, |
11 | 12 | isTranslateFallbackWarn, |
12 | | - NOT_REOSLVED, |
13 | | - MISSING_RESOLVE_VALUE |
| 13 | + MISSING_RESOLVE_VALUE, |
| 14 | + NOT_REOSLVED |
14 | 15 | } from './context' |
15 | | -import { CoreWarnCodes, getWarnMessage } from './warnings' |
16 | 16 | import { CoreErrorCodes, createCoreError } from './errors' |
17 | | -import { Availabilities } from './intl' |
18 | 17 | import { getLocale } from './fallbacker' |
| 18 | +import { Availabilities } from './intl' |
| 19 | +import { CoreWarnCodes, getWarnMessage } from './warnings' |
19 | 20 |
|
20 | | -import type { Locale, FallbackLocale } from './runtime' |
| 21 | +import type { CoreContext, CoreInternalContext } from './context' |
| 22 | +import type { LocaleOptions } from './fallbacker' |
| 23 | +import type { FallbackLocale, Locale } from './runtime' |
21 | 24 | import type { |
22 | 25 | NumberFormat, |
23 | | - NumberFormats as NumberFormatsType, |
24 | 26 | NumberFormatOptions, |
| 27 | + NumberFormats as NumberFormatsType, |
25 | 28 | PickupFormatKeys |
26 | 29 | } from './types' |
27 | | -import type { LocaleOptions } from './fallbacker' |
28 | | -import type { CoreContext, CoreInternalContext } from './context' |
29 | 30 |
|
30 | 31 | /** |
31 | 32 | * # number |
@@ -317,8 +318,8 @@ export function parseNumberArgs( |
317 | 318 | ...args: unknown[] |
318 | 319 | ): [string, number, NumberOptions, Intl.NumberFormatOptions] { |
319 | 320 | const [arg1, arg2, arg3, arg4] = args |
320 | | - const options = {} as NumberOptions |
321 | | - let overrides = {} as Intl.NumberFormatOptions |
| 321 | + const options = create() as NumberOptions |
| 322 | + let overrides = create() as Intl.NumberFormatOptions |
322 | 323 |
|
323 | 324 | if (!isNumber(arg1)) { |
324 | 325 | throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT) |
|
0 commit comments