├── .gitignore ├── babel.config.json ├── test ├── namespace.test.ts ├── parameter-properties.test.ts ├── relationship.test.ts ├── class.test.ts ├── instanceof.test.ts ├── super-constructor.test.ts ├── interface.test.ts ├── inheritance.test.ts ├── error.test.ts ├── gettersetter.test.ts ├── method-overriding.test.ts ├── static.test.ts ├── abstract.test.ts ├── properties.test.ts ├── visibility.test.ts └── polymorphism.test.ts ├── src └── math-util.ts ├── package.json └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | dist 4 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-typescript" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /test/namespace.test.ts: -------------------------------------------------------------------------------- 1 | import {MathUtil} from "../src/math-util"; 2 | 3 | describe('Namespace', () => { 4 | it('should support', () => { 5 | console.info(MathUtil.PI); 6 | console.info(MathUtil.sum(1, 2, 3, 4, 5)); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /test/parameter-properties.test.ts: -------------------------------------------------------------------------------- 1 | describe('Parameter Properties', () => { 2 | 3 | class Person { 4 | constructor(public name: string) { 5 | } 6 | } 7 | 8 | it('should support', () => { 9 | const person = new Person("Eko"); 10 | console.info(person.name); 11 | 12 | person.name = "Budi"; 13 | console.info(person.name); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /src/math-util.ts: -------------------------------------------------------------------------------- 1 | export namespace MathUtil { 2 | 3 | export const PI: number = 3.14; 4 | 5 | export function sum(...values: number[]): number { 6 | let total = 0; 7 | for (const value of values) { 8 | total += value; 9 | } 10 | return total; 11 | } 12 | 13 | } 14 | 15 | export namespace Eko { 16 | 17 | } 18 | 19 | export namespace Kurniawan { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /test/relationship.test.ts: -------------------------------------------------------------------------------- 1 | describe('Relationship', () => { 2 | class Person { 3 | constructor(public name: string) { 4 | } 5 | } 6 | 7 | class Customer { 8 | constructor(public name: string) { 9 | } 10 | } 11 | 12 | it('should support', () => { 13 | const person : Person = new Customer("Eko"); 14 | console.info(person.name); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /test/class.test.ts: -------------------------------------------------------------------------------- 1 | describe('Class', () => { 2 | 3 | class Customer { 4 | constructor() { 5 | console.info("Create new customer"); 6 | } 7 | } 8 | 9 | class Order { 10 | 11 | } 12 | 13 | it('should can create class', () => { 14 | const customer: Customer = new Customer(); 15 | const order = new Order(); 16 | }); 17 | 18 | it('should can create constructors', () => { 19 | new Customer(); 20 | new Customer(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /test/instanceof.test.ts: -------------------------------------------------------------------------------- 1 | describe('Instance Of', () => { 2 | 3 | class Employee {} 4 | class Manager {} 5 | 6 | const budi = new Employee(); 7 | const eko = new Manager(); 8 | 9 | it('should have problem using typeof', () => { 10 | 11 | console.info(typeof budi); 12 | console.info(typeof eko); 13 | }); 14 | 15 | it('should support instanceof', () => { 16 | expect(budi instanceof Employee).toBe(true); 17 | expect(budi instanceof Manager).toBe(false); 18 | 19 | expect(eko instanceof Employee).toBe(false); 20 | expect(eko instanceof Manager).toBe(true); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /test/super-constructor.test.ts: -------------------------------------------------------------------------------- 1 | describe('Super Constructor', () => { 2 | 3 | class Person { 4 | name: string; 5 | 6 | constructor(name: string) { 7 | this.name = name; 8 | } 9 | } 10 | 11 | class Employee extends Person { 12 | department: string; 13 | 14 | constructor(name: string, department: string) { 15 | super(name); 16 | this.department = department; 17 | } 18 | } 19 | 20 | it('should support', () => { 21 | const employee = new Employee("Eko", "Tech"); 22 | console.info(employee.name); 23 | console.info(employee.department); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /test/interface.test.ts: -------------------------------------------------------------------------------- 1 | describe('Interface', () => { 2 | 3 | interface HasName { 4 | name: string; 5 | } 6 | 7 | interface CanSayHello { 8 | sayHello(name: string): void; 9 | } 10 | 11 | class Person implements HasName, CanSayHello { 12 | name: string; 13 | 14 | constructor(name: string) { 15 | this.name = name; 16 | } 17 | 18 | sayHello(name: string): void { 19 | console.info(`Hello ${name}, my name is ${this.name}`); 20 | } 21 | } 22 | 23 | it('should support inheritance', () => { 24 | const person = new Person("Eko"); 25 | person.sayHello("Budi"); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /test/inheritance.test.ts: -------------------------------------------------------------------------------- 1 | describe('Inheritance', () => { 2 | 3 | // parent class 4 | class Employee { 5 | name: string; 6 | 7 | constructor(name: string) { 8 | this.name = name; 9 | } 10 | } 11 | 12 | class Manager extends Employee{ 13 | 14 | } 15 | 16 | class Director extends Manager { 17 | 18 | } 19 | 20 | it('should support', () => { 21 | const employee = new Employee("Eko"); 22 | console.info(employee.name); 23 | 24 | const manager = new Manager("Budi"); 25 | console.info(manager.name); 26 | 27 | const director = new Director("Joko"); 28 | console.info(director.name); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "belajar-typescript-oop", 3 | "version": "1.0.0", 4 | "description": "Belajar TypeScript OOP", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "jest" 8 | }, 9 | "jest": { 10 | "transform": { 11 | "^.+\\.[t|j]sx?$": "babel-jest" 12 | } 13 | }, 14 | "author": "Eko Kurniawan Khannedy", 15 | "license": "ISC", 16 | "type": "module", 17 | "devDependencies": { 18 | "@babel/preset-env": "^7.22.9", 19 | "@babel/preset-typescript": "^7.22.5", 20 | "@jest/globals": "^29.6.2", 21 | "@types/jest": "^29.5.3", 22 | "babel-jest": "^29.6.2", 23 | "jest": "^29.6.2", 24 | "ts-jest": "^29.1.1", 25 | "typescript": "^5.1.6" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/error.test.ts: -------------------------------------------------------------------------------- 1 | describe('Error Handling', () => { 2 | 3 | class ValidationError extends Error { 4 | constructor(public message: string) { 5 | super(message); 6 | } 7 | } 8 | 9 | function doubleIt(value: number): number { 10 | if (value < 0) { 11 | throw new ValidationError("Value cannot be less than 0"); 12 | } 13 | return value * 2; 14 | } 15 | 16 | it('should support', () => { 17 | try { 18 | const result = doubleIt(-1); 19 | console.info(result); 20 | } catch (e) { 21 | if (e instanceof ValidationError) { 22 | console.info(e.message); 23 | } 24 | } 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /test/gettersetter.test.ts: -------------------------------------------------------------------------------- 1 | describe('Getter and Setter', () => { 2 | 3 | class Category { 4 | _name?: string; 5 | 6 | get name(): string { 7 | if (this._name) { 8 | return this._name; 9 | } else { 10 | return "empty"; 11 | } 12 | } 13 | 14 | set name(value: string) { 15 | if (value !== "") { 16 | this._name = value; 17 | } 18 | } 19 | } 20 | 21 | it('should support in class', () => { 22 | const category = new Category(); 23 | console.info(category.name); 24 | 25 | category.name = "Food"; 26 | console.info(category.name); 27 | 28 | category.name = ""; 29 | console.info(category.name); 30 | 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /test/method-overriding.test.ts: -------------------------------------------------------------------------------- 1 | describe('Method Overriding', () => { 2 | 3 | class Employee { 4 | name: string; 5 | 6 | constructor(name: string) { 7 | this.name = name; 8 | } 9 | 10 | sayHello(name: string): void{ 11 | console.info(`Hello ${name}, my name is ${this.name}`); 12 | } 13 | } 14 | 15 | class Manager extends Employee { 16 | 17 | sayHello(name: string): void { 18 | super.sayHello(name); 19 | console.info(`And, I am your manager`); 20 | } 21 | } 22 | 23 | 24 | it('should support', () => { 25 | const employee = new Employee("Eko"); 26 | employee.sayHello("Budi"); 27 | 28 | const manager = new Manager("Eko"); 29 | manager.sayHello("Budi"); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /test/static.test.ts: -------------------------------------------------------------------------------- 1 | describe('Static', () => { 2 | 3 | class Configuration { 4 | static NAME: string = "Belajar TypeScript OOP"; 5 | static VERSION: number = 1.0; 6 | static AUTHOR: string = "Eko Kurniawan Khannedy"; 7 | } 8 | 9 | class MathUtil { 10 | static sum(...values: number[]): number { 11 | let total = 0; 12 | for (const value of values) { 13 | total += value; 14 | } 15 | return total; 16 | } 17 | } 18 | 19 | it('should support static method', () => { 20 | console.info(MathUtil.sum(1, 2, 3, 4, 5)); 21 | }); 22 | 23 | it('should support', () => { 24 | console.info(Configuration.NAME); 25 | console.info(Configuration.VERSION); 26 | console.info(Configuration.AUTHOR); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /test/abstract.test.ts: -------------------------------------------------------------------------------- 1 | describe('Abstract Class', () => { 2 | 3 | abstract class Customer { 4 | readonly id: number; 5 | abstract name: string; 6 | 7 | constructor(id: number) { 8 | this.id = id; 9 | } 10 | 11 | hello() { 12 | console.info('Hello'); 13 | } 14 | 15 | abstract sayHello(name: string): void; 16 | } 17 | 18 | class RegularCustomer extends Customer { 19 | name: string; 20 | 21 | constructor(id: number, name: string) { 22 | super(id); 23 | this.name = name; 24 | } 25 | 26 | sayHello(name: string):void { 27 | console.info(`Hello ${name}, my name is ${this.name}`); 28 | } 29 | } 30 | 31 | it('should support', () => { 32 | const customer1 = new RegularCustomer(1, "Eko"); 33 | customer1.sayHello("Budi"); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /test/properties.test.ts: -------------------------------------------------------------------------------- 1 | describe('Properties', () => { 2 | 3 | class Customer { 4 | readonly id: number; 5 | name: string = "Guest"; 6 | age?: number; 7 | 8 | constructor(id: number, name: string) { 9 | this.id = id; 10 | this.name = name; 11 | } 12 | 13 | sayHello(name: string): void { 14 | console.info(`Hello ${name}, my name is ${this.name}`); 15 | } 16 | } 17 | 18 | it('should can have properties', () => { 19 | 20 | const customer = new Customer(1, "Jonh"); 21 | customer.age = 20; 22 | 23 | console.info(customer.id); 24 | console.info(customer.name); 25 | console.info(customer.age); 26 | console.info(customer); 27 | 28 | }); 29 | 30 | it('should can have methods', () => { 31 | const customer = new Customer(1, "Eko"); 32 | customer.sayHello("Budi"); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /test/visibility.test.ts: -------------------------------------------------------------------------------- 1 | describe('Visibility', () => { 2 | class Counter { 3 | protected counter: number = 0; 4 | 5 | public increment(): void { 6 | this.counter++; 7 | } 8 | 9 | public getCounter(): number { 10 | return this.counter; 11 | } 12 | } 13 | 14 | class DoubleCounter extends Counter { 15 | 16 | public increment():void { 17 | this.counter += 2; 18 | } 19 | } 20 | 21 | it('should support private', () => { 22 | const counter = new Counter(); 23 | counter.increment(); 24 | counter.increment(); 25 | counter.increment(); 26 | console.info(counter.getCounter()); 27 | }); 28 | 29 | it('should support protected', () => { 30 | const counter = new DoubleCounter(); 31 | counter.increment(); 32 | counter.increment(); 33 | counter.increment(); 34 | console.info(counter.getCounter()); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /test/polymorphism.test.ts: -------------------------------------------------------------------------------- 1 | describe('Polymorphism', () => { 2 | 3 | class Employee { 4 | constructor(public name: string) { 5 | } 6 | } 7 | 8 | class Manager extends Employee { 9 | 10 | } 11 | 12 | class VicePresident extends Manager { 13 | 14 | } 15 | 16 | function sayHello(employee: Employee): void { 17 | if (employee instanceof VicePresident) { 18 | const vp = employee as VicePresident; 19 | console.info(`Hello VP ${vp.name}`); 20 | } else if (employee instanceof Manager) { 21 | const manager = employee as Manager; 22 | console.info(`Hello manager ${manager.name}`); 23 | } else { 24 | console.info(`Hello employee ${employee.name}`); 25 | } 26 | } 27 | 28 | function sayHelloWrong(employee: Employee): void { 29 | if (employee instanceof Manager) { 30 | const manager = employee as Manager; 31 | console.info(`Hello manager ${manager.name}`); 32 | } else if (employee instanceof VicePresident) { 33 | const vp = employee as VicePresident; 34 | console.info(`Hello VP ${vp.name}`); 35 | } else { 36 | console.info(`Hello employee ${employee.name}`); 37 | } 38 | } 39 | 40 | it('should support', () => { 41 | let employee: Employee = new Employee("Eko"); 42 | console.info(employee); 43 | 44 | employee = new Manager("Eko"); 45 | console.info(employee); 46 | 47 | employee = new VicePresident("Eko"); 48 | console.info(employee); 49 | }); 50 | 51 | it('should support method parameter polymorphism', () => { 52 | sayHello(new Employee("Eko")); 53 | sayHello(new Manager("Budi")); 54 | sayHello(new VicePresident("Joko")); 55 | }); 56 | 57 | it('should support method parameter polymorphism wrong', () => { 58 | sayHelloWrong(new Employee("Eko")); 59 | sayHelloWrong(new Manager("Budi")); 60 | sayHelloWrong(new VicePresident("Joko")); 61 | }); 62 | }); 63 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "ES6", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | --------------------------------------------------------------------------------