Skip to content

Instantly share code, notes, and snippets.

@AdventureBeard
AdventureBeard / node-typescript-esm.md
Created November 22, 2023 01:46 — forked from khalidx/node-typescript-esm.md
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

import * as Y from 'yjs'
import {AbstractType} from 'yjs'
import {YXmlFragment} from "yjs/dist/src/types/YXmlFragment";
import { isEqual } from 'lodash'
type CopyParams = {
fromDoc: Y.Doc,
aang
aaracokra
ability
abjuration
abjurer
aboleth
abyss
abyssal
acererak
acid