You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think --initcould be improved a lot if TypeScript provided an interactive init. People don't know TS flags at the beginning, so it is not wise to require them knowing the flags before creating a tsconfig.json file:
tsc --init
This utility will walk you through creating a tsconfig.json file.
It only covers the most common items, and tries to guess sensible defaults.
--
Which JS compilation target do you want to target?
target(default=es5, alt=es3,es6)? es5
--
Strict null checking provides null type checking capability. `null` and `undefined` will be types that are not assignable to all types anymore. They are only assignable to itself or `any` .
Turn on 'strictNullChecking' flag(default=yes, alt=no)?
--
No implicit any flag helps you from implicitly typing `anys` in parameters and local variables. With this flag only explicit `anys` will be allowed
Turn on 'noImplicitAny' flag(default=yes, alt=no)? yes
--
Is your project a NodeJS based project(default=no, alt=yes)? yes
Downloading types for NodeJS
npm install @types/node --save
------
======> 13%
Downloading @types/node
------
The text was updated successfully, but these errors were encountered:
Great idea. This looks a lot like JSPM init. It could do clever things like ask what file your entry point will be called and if you respond index.js it would set "allowJs": true
I would prefer it be called more like npm. npm init initiates it interactively or npm init -y takes all of the defaults. If I want to change my defaults (in npm that's things like my name and my preferred license) then I modify (in the command line or in a text editor) my .npmrc file and those defaults are used every time I do npm init -y.
Currently I use tsc --init and then reference a OneNote that I use to remind myself which configuration options I like to change.
Declining due to low feedback and lack of interest on our side in implementing. We're not really sure what kind of questions would get asked and we like that there's one place to put our "recommended" config.
I think
--init
could be improved a lot if TypeScript provided an interactive init. People don't know TS flags at the beginning, so it is not wise to require them knowing the flags before creating a tsconfig.json file:The text was updated successfully, but these errors were encountered: