Skip to content

Commit 6c765fe

Browse files
committed
ref: switch to esnext import syntax
1 parent 1e2015c commit 6c765fe

7 files changed

+18
-18
lines changed

lib/DataStoreSerializer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getUnsafeWindow, type DataStore } from ".";
1+
import { getUnsafeWindow, type DataStore } from "./index.js";
22

33
export type DataStoreSerializerOptions = {
44
/** Whether to add a checksum to the exported data */

lib/SelectorObserver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { debounce } from "./misc";
1+
import { debounce } from "./misc.js";
22

33
/** Options for the `onSelector()` method of {@linkcode SelectorObserver} */
44
export type SelectorListenerOptions<TElem extends Element = HTMLElement> = SelectorOptionsOne<TElem> | SelectorOptionsAll<TElem>;

lib/array.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { randRange } from "./math";
1+
import { randRange } from "./math.js";
22

33
/** Describes an array with at least one item */
44
export type NonEmptyArray<TArray = unknown> = [TArray, ...TArray[]];

lib/index.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
export * from "./array";
2-
export * from "./DataStore";
3-
export * from "./DataStoreSerializer";
4-
export * from "./dom";
5-
export * from "./math";
6-
export * from "./misc";
7-
export * from "./SelectorObserver";
8-
export * from "./translation";
9-
export * from "./types";
1+
export * from "./array.js";
2+
export * from "./DataStore.js";
3+
export * from "./DataStoreSerializer.js";
4+
export * from "./dom.js";
5+
export * from "./math.js";
6+
export * from "./misc.js";
7+
export * from "./SelectorObserver.js";
8+
export * from "./translation.js";
9+
export * from "./types.js";

lib/misc.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getUnsafeWindow } from "./dom";
2-
import type { Stringifiable } from "./types";
1+
import { getUnsafeWindow } from "./dom.js";
2+
import type { Stringifiable } from "./types.js";
33

44
/**
55
* Automatically appends an `s` to the passed {@linkcode word}, if {@linkcode num} is not equal to 1

lib/translation.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { insertValues } from "./misc";
2-
import type { Stringifiable } from "./types";
1+
import { insertValues } from "./misc.js";
2+
import type { Stringifiable } from "./types.js";
33

44
/** Trans rights! 🏳️‍⚧️ */
55
const trans: Record<string, Record<string, string>> = {};

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"module": "ESNext",
4-
"moduleResolution": "node",
3+
"module": "NodeNext",
4+
"moduleResolution": "NodeNext",
55
"target": "ES2016",
66
"outDir": "dist/out",
77
"lib": ["ES2020", "DOM", "DOM.Iterable"],

0 commit comments

Comments
 (0)