Skip to content

Commit

Permalink
feat: 🎸 add runtime typings
Browse files Browse the repository at this point in the history
✅ Closes: Closes #43
  • Loading branch information
kaisermann committed Feb 3, 2020
1 parent 31b556b commit 7bf47d8
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 24 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Expand Up @@ -2,4 +2,8 @@ node_modules
*.log
dist/
coverage/
/types/
<<<<<<< HEAD
/types/
=======
types/
>>>>>>> feat: 🎸 add runtime typings
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test/runtime/includes/utils.test.ts
@@ -1,5 +1,5 @@
import { getClientLocale } from '../../../src/client/includes/getClientLocale'
import { flatObj } from '../../../src/client/includes/flatObj'
import { getClientLocale } from '../../../src/runtime/includes/getClientLocale'
import { flatObj } from '../../../src/runtime/includes/flatObj'

describe('getting client locale', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/runtime/index.test.ts
Expand Up @@ -5,7 +5,7 @@ import {
getLocaleDictionary,
$dictionary,
} from '../../src/runtime/stores/dictionary'
import { $format } from '../../src/runtime/stores/format'
import { $format } from '../../src/runtime/stores/formatters'

test('defineMessages returns the identity of its first argument', () => {
const obj = {}
Expand Down
@@ -1,28 +1,21 @@
<<<<<<< HEAD:test/runtime/stores/format.test.ts
import { Formatter } from '../../../src/runtime/types'
import { $format } from '../../../src/runtime/stores/format'
import { init } from '../../../src/runtime/configs'
import { addMessages } from '../../../src/runtime/stores/dictionary'
import { $locale } from '../../../src/runtime/stores/locale'
=======

import { get } from 'svelte/store'

import {
$format,
$formatTime,
$formatDate,
$formatNumber,
} from '../../../src/client/stores/formatters'
import { init } from '../../../src/client/configs'
import { addMessages } from '../../../src/client/stores/dictionary'
import { $locale } from '../../../src/client/stores/locale'
import { MessageFormatter } from '../../../src/client/types'
import {
} from '../../../src/runtime/stores/formatters'
import { init } from '../../../src/runtime/configs'
import { addMessages } from '../../../src/runtime/stores/dictionary'
import { $locale } from '../../../src/runtime/stores/locale'
import { MessageFormatter ,
TimeFormatter,
DateFormatter,
NumberFormatter,
} from '../../../src/client/types/index'
>>>>>>> feat: 🎸 make date,time and number formatters tree-shakeable:test/client/stores/formatters.test.ts
} from '../../../src/runtime/types'


let formatMessage: MessageFormatter
let formatTime: TimeFormatter
Expand Down
9 changes: 4 additions & 5 deletions test/runtime/stores/locale.test.ts
Expand Up @@ -8,11 +8,10 @@ import {
getCurrentLocale,
$locale,
isRelatedLocale,
} from '../../../src/client/stores/locale'
import { getOptions, init } from '../../../src/client/configs'
import { register } from '../../../src/client'
import { hasLocaleQueue } from '../../../src/client/includes/loaderQueue'
import { getClientLocale } from '../../../src/client/includes/getClientLocale'
} from '../../../src/runtime/stores/locale'
import { getOptions, init } from '../../../src/runtime/configs'
import { register } from '../../../src/runtime'
import { hasLocaleQueue } from '../../../src/runtime/includes/loaderQueue'

beforeEach(() => {
init({ fallbackLocale: undefined })
Expand Down

0 comments on commit 7bf47d8

Please sign in to comment.