https://github.com/gnlow/tsm
tsm: CDN<TS => JS>
https://github.com/gnlow/tsm
Last synced: over 1 year ago
JSON representation
tsm: CDN<TS => JS>
- Host: GitHub
- URL: https://github.com/gnlow/tsm
- Owner: gnlow
- Created: 2023-10-08T12:03:09.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-19T04:33:49.000Z (over 2 years ago)
- Last Synced: 2025-03-27T22:13:10.803Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://tsm.deno.dev
- Size: 3.91 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tsm
**tsm is experimental project, and is not ready for production**
Use TypeScript everywhere
- Transfiles TS to JS via [deno_emit](https://github.com/denoland/deno_emit)
- Provides type information via `x-typescript-types` header
## Usage
```ts
// https://examples.deno.land/import-export/util.ts
export function sayHello(thing: string) {
console.log(`Hello, ${thing}!`);
}
export interface Foo {}
export class Bar {}
export const baz = "baz";
```
```js
// https://tsm.deno.dev/https://examples.deno.land/import-export/util.ts
export function sayHello(thing) {
console.log(`Hello, ${thing}!`);
}
export class Bar {
}
export const baz = "baz";
```
```html
```