https://github.com/stefnotch/typestef
Various utilities that I end up copying into too many Typescript projects
https://github.com/stefnotch/typestef
Last synced: 8 days ago
JSON representation
Various utilities that I end up copying into too many Typescript projects
- Host: GitHub
- URL: https://github.com/stefnotch/typestef
- Owner: stefnotch
- License: apache-2.0
- Created: 2024-03-21T11:59:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-22T09:47:15.000Z (about 2 years ago)
- Last Synced: 2025-11-23T15:05:30.398Z (7 months ago)
- Language: TypeScript
- Size: 199 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Typestef
Various utilities that should be in the JS standard library. Feel free to copy-paste the code instead of using this as a library.
Dual licensed under the Apache License Version 2.0 and CC0.
## Scripts
- `npm run build`
- `npm run release`
## FAQ
- Typescript cannot find the library?
That's because this uses the [`"export"` field in the `package.json`](https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing). Go to your `tsconfig.json`, or create one if there is none, and set
```json
{
"compilerOptions": {
/* This tells Typescript that we're working with the new importing mechanisms */
"module": "nodenext",
}
}
```
Make sure to read [the documentation](https://www.typescriptlang.org/docs/handbook/esm-node.html) for what that means, among other things all the imports in your code might need a file extension.