Use module: node16

This commit is contained in:
Nathan Bierema 2024-04-06 23:22:27 -04:00
parent e88752b8e8
commit 2f476f144d
9 changed files with 28 additions and 11 deletions

View File

@ -1,4 +1,4 @@
export type { HierarchyPointNode } from 'd3'; export type { HierarchyPointNode } from 'd3';
export type { StyleValue } from 'd3tooltip'; export type { StyleValue } from 'd3tooltip';
export { default as tree } from './tree/tree'; export { default as tree } from './tree/tree.js';
export type { Node, Options } from './tree/tree'; export type { Node, Options } from './tree/tree.js';

View File

@ -9,7 +9,7 @@ import {
toggleChildren, toggleChildren,
visit, visit,
getNodeGroupByDepthCount, getNodeGroupByDepthCount,
} from './utils'; } from './utils.js';
import { tooltip } from 'd3tooltip'; import { tooltip } from 'd3tooltip';
import type { StyleValue } from 'd3tooltip'; import type { StyleValue } from 'd3tooltip';

View File

@ -1,6 +1,6 @@
import { is, join, pipe, replace } from 'ramda'; import { is, join, pipe, replace } from 'ramda';
import sortAndSerialize from './sortAndSerialize'; import sortAndSerialize from './sortAndSerialize.js';
import type { InternalNode } from './tree'; import type { InternalNode } from './tree.js';
export function collapseChildren(node: InternalNode) { export function collapseChildren(node: InternalNode) {
if (node.children) { if (node.children) {

View File

@ -1,2 +1,7 @@
export { tree } from './charts'; export { tree } from './charts/index.js';
export type { HierarchyPointNode, Node, Options, StyleValue } from './charts'; export type {
HierarchyPointNode,
Node,
Options,
StyleValue,
} from './charts/index.js';

View File

@ -1,5 +1,5 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.esm.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "lib" "outDir": "lib"
}, },

View File

@ -1,5 +1,5 @@
{ {
"extends": "../../tsconfig.react.base.json", "extends": "../../tsconfig.esm.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "lib" "outDir": "lib"
}, },

View File

@ -1,5 +1,5 @@
{ {
"extends": "../../tsconfig.react.base.json", "extends": "../../tsconfig.esm.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "lib" "outDir": "lib"
}, },

View File

@ -1,5 +1,5 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.esm.base.json",
"compilerOptions": { "compilerOptions": {
"types": ["jest"] "types": ["jest"]
}, },

12
tsconfig.esm.base.json Normal file
View File

@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "es2020",
"module": "node16",
"declaration": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"types": []
}
}