понедельник, 14 декабря 2020 г.

Typescript, Init

npm init

or

npm init -y

npm install -D typescript

tsc -v

if(version mismathes) then

npm i -g typescript

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">


tsc --init -> create tsconfig.json

tsconfig.json outDir, rootdir

Compliler options

https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options

--lib

   "lib": ["DOM","ScriptHost""DOM.Iterable""ES6"],                             /* Specify library files to be included in the compilation. */
    // "allowJs": true,                       /* Allow javascript files to be compiled. */
    // "checkJs": true,                       /* Report errors in .js files. */
    // "jsx": "preserve",                     /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
    // "declaration": true,                   /* Generates corresponding '.d.ts' file. */
    // "declarationMap": true,                /* Generates a sourcemap for each corresponding '.d.ts' file. */
     "sourceMap"true,  

source map : to see src from the browser source

"removeComments"true,                /* Do not emit comments to output. */

Комментариев нет:

Отправить комментарий