Skip to content

stagas/ts

Repository files navigation

typescript-minimal-template

minimal typescript template

npm i typescript-minimal-template pnpm add typescript-minimal-template yarn add typescript-minimal-template

Examples

# node
    # view source example/node.ts

    import { add } from 'typescript-minimal-template'
    
    console.log(add(1, 2))

# web
    # view source example/web.ts

    import { add } from 'typescript-minimal-template'
    
    const main = document.querySelector('main')!
    
    main.innerHTML = `<h1>1 + 2 = ${add(1, 2)}</h1>`

Features

API

# add(a, b) – Adds two numbers together. src/mod.ts#L12

    add(1, 2) // => 3

    # a – First number

      number

    # b – Second number

      number

    add(a, b)  =>

      number

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas