Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

generate tsconfig

npx tsc --init
Comment

tsconfig.json not generated

$ tsc --init
Comment

generate tsconfig

[1] $ tsc -v
[2] If the version is older than 1.6:
	$ npm install -g typescript
[3] $ tsc --init
Comment

tsconfig.json

// mytsconfig.
{
    "compilerOptions": {
        "allowJs": true,
        "checkJs": false,
        "allowSyntheticDefaultImports": true,
        "esModuleInterop": true,
        "typeRoots": ["src/types", "node_modules/@types"],
        "baseUrl": "src",
        "paths": {
            "@/*": ["*"] // matching @src/* to src/*
        },
        "outDir": "dist",
        "experimentalDecorators": true,
        
    },
    "exclude": ["node_modules", "dist"],
    "include": ["src/**/*","src/*"]
}
Comment

tsconfig.json, Typescript

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "jsxImportSource": "preact"
  }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: java 8 add whole array to jsonarray 
Javascript :: js convert to fraction 
Javascript :: jquery find checkbox by value 
Javascript :: node.js dns lookup 
Javascript :: print page in javascript 
Javascript :: js add class 
Javascript :: useref hook react 
Javascript :: Nullish Coalescing Vs Logical OR opreators 
Javascript :: truncate text javascript 
Javascript :: click on a radio button using jquery 
Javascript :: js remove the last character from a string 
Javascript :: converting javascript object to json 
Javascript :: How to Set Active Tab in jQuery Ui 
Javascript :: react font awesome 
Javascript :: js object get type 
Javascript :: An external JavaScript cannot contain the <script tag 
Javascript :: vue cli - Uncaught SyntaxError: Unexpected token < 
Javascript :: js get clipboard data 
Javascript :: class element in javascript 
Javascript :: change href without reloading page js 
Javascript :: js concat variable and string 
Javascript :: laravel return validation errors ajax 
Javascript :: react scrollTop smooth 
Javascript :: js remove li from ul 
Javascript :: typescript read json file 
Javascript :: classname did not match server next js styled components 
Javascript :: javascript shuffle string 
Javascript :: how to eliminate decimals in js 
Javascript :: react add link to button 
Javascript :: react native override style 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =