From b40d8ae6fd0692dcf508aeed8d97c93eaa66c507 Mon Sep 17 00:00:00 2001 From: Andrej Dyck <43913051+andrej-dyck@users.noreply.github.com> Date: Sat, 11 May 2024 11:24:36 +0200 Subject: [PATCH] use .ts imports --- events/TypedEvents.test.ts | 2 +- events/index.ts | 2 +- index.ts | 18 +++++++++--------- json/maybeJson.test.ts | 2 +- lazy/lazy.test.ts | 2 +- locale/index.ts | 2 +- locale/localeNumber.test.ts | 2 +- memoize/memoize.test.ts | 2 +- records/hasField.test.ts | 2 +- records/index.ts | 6 +++--- records/omitFields.test.ts | 2 +- records/pickFields.test.ts | 2 +- sequences/generateSequence.test.ts | 2 +- sequences/index.ts | 2 +- types/index.ts | 2 +- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/events/TypedEvents.test.ts b/events/TypedEvents.test.ts index 90ba864..7b6f33f 100644 --- a/events/TypedEvents.test.ts +++ b/events/TypedEvents.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest' -import { typedEvents } from './TypedEvents.js' +import { typedEvents } from './TypedEvents.ts' describe('TypedEvents', () => { diff --git a/events/index.ts b/events/index.ts index 01fc904..da6d50c 100644 --- a/events/index.ts +++ b/events/index.ts @@ -1 +1 @@ -export * from './TypedEvents.js' +export * from './TypedEvents.ts' diff --git a/index.ts b/index.ts index d0bc8ba..caa309e 100644 --- a/index.ts +++ b/index.ts @@ -1,9 +1,9 @@ -export * from './events/index.js' -export * from './json/index.js' -export * from './lazy/index.js' -export * from './locale/index.js' -export * from './nullables/index.js' -export * from './raise/index.js' -export * from './records/index.js' -export * from './sequences/index.js' -export * from './types/index.js' +export * from './events/index.ts' +export * from './json/index.ts' +export * from './lazy/index.ts' +export * from './locale/index.ts' +export * from './nullables/index.ts' +export * from './raise/index.ts' +export * from './records/index.ts' +export * from './sequences/index.ts' +export * from './types/index.ts' diff --git a/json/maybeJson.test.ts b/json/maybeJson.test.ts index 8670908..3db12f5 100644 --- a/json/maybeJson.test.ts +++ b/json/maybeJson.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import { maybeJson } from './index.js' +import { maybeJson } from './index.ts' import { z } from 'zod' test.each([ diff --git a/lazy/lazy.test.ts b/lazy/lazy.test.ts index ff42dd3..1bf920b 100644 --- a/lazy/lazy.test.ts +++ b/lazy/lazy.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import { lazy } from './index.js' +import { lazy } from './index.ts' test('lazy remembers the value of its function', () => { const lazyValue = lazy(() => 1) diff --git a/locale/index.ts b/locale/index.ts index 28a66a4..66b5de5 100644 --- a/locale/index.ts +++ b/locale/index.ts @@ -1 +1 @@ -export * from './localeNumber.js' +export * from './localeNumber.ts' diff --git a/locale/localeNumber.test.ts b/locale/localeNumber.test.ts index 88950e9..dc5bb57 100644 --- a/locale/localeNumber.test.ts +++ b/locale/localeNumber.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, test } from 'vitest' -import { localeNumber, Locale } from './localeNumber.js' +import { localeNumber, Locale } from './localeNumber.ts' describe('localeNumber', () => { diff --git a/memoize/memoize.test.ts b/memoize/memoize.test.ts index f9d6816..c770e8b 100644 --- a/memoize/memoize.test.ts +++ b/memoize/memoize.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest' -import { memoize } from './index.js' +import { memoize } from './index.ts' describe('memoize', () => { diff --git a/records/hasField.test.ts b/records/hasField.test.ts index 2bc65da..a92625a 100644 --- a/records/hasField.test.ts +++ b/records/hasField.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import { hasField } from './hasField.js' +import { hasField } from './hasField.ts' test('hasField infers that a field exists on an unknown object', () => { const obj: unknown = { id: 1 } diff --git a/records/index.ts b/records/index.ts index 5002ef4..3441d25 100644 --- a/records/index.ts +++ b/records/index.ts @@ -1,3 +1,3 @@ -export * from './hasField.js' -export * from './pickFields.js' -export * from './omitFields.js' +export * from './hasField.ts' +export * from './pickFields.ts' +export * from './omitFields.ts' diff --git a/records/omitFields.test.ts b/records/omitFields.test.ts index 869b01f..df54598 100644 --- a/records/omitFields.test.ts +++ b/records/omitFields.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import { omitFields } from './omitFields.js' +import { omitFields } from './omitFields.ts' test('omitFields omits a field from an object', () => { expect(omitFields({ a: 1, b: 2, c: 3 }, 'b')).toMatchObject({ a: 1, c: 3 }) diff --git a/records/pickFields.test.ts b/records/pickFields.test.ts index db5a0a4..3c6adbc 100644 --- a/records/pickFields.test.ts +++ b/records/pickFields.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import { pickFields } from './pickFields.js' +import { pickFields } from './pickFields.ts' test('pickFields picks a field from an object', () => { expect(pickFields({ a: 1, b: 2, c: 3 }, 'b')).toMatchObject({ b: 2 }) diff --git a/sequences/generateSequence.test.ts b/sequences/generateSequence.test.ts index d4700f5..fa7e78d 100644 --- a/sequences/generateSequence.test.ts +++ b/sequences/generateSequence.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import { generateSequence } from './index.js' +import { generateSequence } from './index.ts' test('generateSequence has only seed when next is null', () => { expect([...generateSequence(1, () => null)]).toEqual([1]) diff --git a/sequences/index.ts b/sequences/index.ts index 640f971..1b36c5b 100644 --- a/sequences/index.ts +++ b/sequences/index.ts @@ -1 +1 @@ -export * from './generateSequence.js' +export * from './generateSequence.ts' diff --git a/types/index.ts b/types/index.ts index 0059ef5..cd80594 100644 --- a/types/index.ts +++ b/types/index.ts @@ -1 +1 @@ -export * from './DeepPartial.js' +export * from './DeepPartial.ts'