Skip to content

Instantly share code, notes, and snippets.

@dilipsuthar97
Last active May 11, 2020 08:41
Show Gist options
  • Save dilipsuthar97/1246b2a7f97f0ad470b5654d920c27d6 to your computer and use it in GitHub Desktop.
Save dilipsuthar97/1246b2a7f97f0ad470b5654d920c27d6 to your computer and use it in GitHub Desktop.
ReactNative typescript configuration json file
{
"compilerOptions": {
/* Basic Options */
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
"isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,
"lib": ["ES2017", "ES7", "ES6", "DOM"],
"declaration": true,
"outDir": "lib", /* Add tthis only for library project otherwise comment this line */
/* Strict Type-Checking Options */
"strict": true /* Enable all strict type-checking options. */,
"strictFunctionTypes": true /* Enable strict checking of function types. */,
"noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
"alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */,
/* Module Resolution Options */
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"resolveJsonModule": true,
/* Advanced Options */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
},
"exclude": ["node_modules", "lib"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment