0.1.23 • Published 2 years ago

strictts v0.1.23

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

TypeScript config compilerOptions reasonable defaults with type safety focus.

Read annotated version to get more details about each changed default. Configs are grouped into sections as they are in official compilerOptions reference.

Start new TypeScript project with tsconfig.json:

{
    "extends": "strictts",
    "compilerOptions": {
        ...
    },
    ...
}

and define project-specific options (take tsconfig-project.json as default). tsconfig-project.json is a recommended place to go if you start pure TS project aimed ES2019 runtimes.

I'm working on the React.js UI framework using TypeScript compiler configured with these defaults. The project contains more than 20k lines of code and thrown zero runtime exceptions (from ES2019-compliant environments) for more than six months in production.

I do not include lib.dom to default compilation to ensure global namespace be pure ES2019 prelude.

I do:

import env from "env"
env.console.log(env.document.body)

where env module is environment-specific module which is env.d.ts from TS distro if I run project in a web browser, or jsdom bindings if I run project in Node.js test env, and so on. Explicit definition of environment bindings (or declarations) helps me to deliver solid reliable code which runs in defferent environments without runtime exceptions.

0.1.23

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.16

3 years ago

0.1.15

3 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago