[
  {
    "path": ".gitignore",
    "content": "coverage\nlib\nnode_modules"
  },
  {
    "path": ".prettierignore",
    "content": "coverage\nlib\npackage.json\nREADME.md\ntsconfig.json"
  },
  {
    "path": ".prettierrc.yml",
    "content": "arrowParens: avoid\nbracketSpacing: true\nprintWidth: 100\nsemi: true\ntabWidth: 2\ntrailingComma: all\nsingleQuote: true\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n  - node\ncache: yarn\nscript:\n  - yarn test\n  - yarn format\nafter_success: cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"typescript.tsdk\": \"node_modules/typescript/lib\",\n  \"editor.codeActionsOnSave\": {\n    \"source.organizeImports\": true\n  },\n  \"editor.formatOnSave\": true\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2018 Tom Crockett\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "README.md",
    "content": "# HKTS - Higher-Kinded TypeScript [![Build Status](https://travis-ci.com/pelotom/hkts.svg?branch=master)](https://travis-ci.com/pelotom/hkts)\n\n## Overview\n\nTypeScript [doesn't directly support higher-kinded types yet](https://github.com/Microsoft/TypeScript/issues/1213), but various attempts have been made to simulate them (see [related work](https://github.com/pelotom/hkts/blob/master/README.md#related-work) at the bottom). This project presents a new, greatly simplified approach to encoding HKTs using the power of conditional types.\n\nThe idea is that, although we can't truly abstract over a type constructor `type T<A> = ...`, we _can_ abstract over the result `T<_>` of applying it to a special placeholder type `_`. Then, if we can somehow substitute all instances of `_` within a type, we effectively have the ability to \"apply\" `T` at arbitrary types. That is, we can abstract over `T`! And it turns out we can define a substitution operator `$<T, S>` which does just that.\n\nHere's how we would use `$` to define the [static-land's `Functor` type class](https://github.com/rpominov/static-land/blob/master/docs/spec.md#functor):\n\n```ts\ninterface Functor<T> {\n  map: <A, B>(f: (x: A) => B, t: $<T, [A]>) => $<T, [B]>;\n}\n```\n\nThen, supposing we have a `Maybe` type constructor\n\n```ts\ntype Maybe<A> = { tag: 'none' } | { tag: 'some'; value: A };\nconst none: Maybe<never> = { tag: 'none' };\nconst some = <A>(value: A): Maybe<A> => ({ tag: 'some', value });\n```\n\nwe can define a `Functor` instance for it like so, using the placeholder type `_`:\n\n```ts\nconst MaybeFunctor: Functor<Maybe<_>> = {\n  map: (f, maybe) => maybe.tag === 'none' ? none : some(f(maybe.value)),\n};\n\n// It works!\nexpect(MaybeFunctor.map(n => n + 1, some(42))).toEqual(some(43));\n```\n\n## Type classes and instance factories\n\nThis package defines [a set of interfaces](https://github.com/pelotom/hkts/blob/master/src/static-land.ts) corresponding to the the type classes of the [static-land spec](https://github.com/rpominov/static-land), as well as factory functions for producing instances thereof. For example, there is a `Monad` interface as well as a `Monad` function. The function takes as arguments only the minimum data (`of` and `chain`) needed to produce an implementation of the full `Monad` interface (which includes other derived methods like `map`, `ap` and `join`). So again using the `Maybe` type above, we can construct a `Monad` instance like so:\n\n```ts\nconst MaybeMonad = Monad<Maybe<_>>({\n  of: some,\n  chain: (f, maybe) => maybe.tag === 'none' ? none : f(maybe.value),\n});\n\n// Use the `map` method, which we didn't have to define:\nexpect(MaybeMonad.map(n => n + 1, some(42))).toBe(some(43));\n```\n\n## Abstracting over kinds of higher arity\n\nYou may have noticed in the above example that `$` takes an array of substitution types as its second parameter. There are also placeholders `_0` (an alias for `_`), `_1`, `_2`, ..., `_<N>`. `$<T, S>` simultaneously replaces `_0` with `S[0]`, `_1` with `S[1]`, and so on, throughout `T`. This allows us to define, for example, `Bifunctor`, which abstracts over a type constructor of kind `(*, *) -> *`:\n\n```ts\ninterface Bifunctor<T> {\n  bimap: <A, B, C, D>(f: (x: A) => B, g: (x: C) => D, t: $<T, [A, C]>) => $<T, [B, D]>;\n  // ...\n}\n```\n\nThen given an `Either` type constructor\n\n```ts\ntype Either<A, B> = { tag: 'left'; left: A } | { tag: 'right'; right: B };\nconst left = <A>(left: A): Either<A, never> => ({ tag: 'left', left });\nconst right = <B>(right: B): Either<never, B> => ({ tag: 'right', right });\n```\n\na `Bifunctor` instance for it looks like\n\n```ts\ntype EitherBifunctor: Bifunctor<Either<_0, _1>> = {\n  bimap: (f, g, either) => (either.tag === 'left' ? left(f(either.left)) : right(g(either.right))),\n};\n```\n\n## Fixing type parameters\n\nSuppose we want to ignore one or more of the parameters of a type constructor for the purpose of making it an instance of a type class. For example we can make a `Monad` out of `Either` by ignoring its first parameter and using the second parameter as the \"hole\" of the monad. The way to do this is to make a polymorphic instance creation function which can produce a `Monad` instance _for any given left type `L`_:\n\n```ts\nconst RightMonad = <L>() => Monad<Either<L, _>>({\n  of: right,\n  chain: (f, either) => either.tag === 'left' ? either : f(either.right),\n});\n```\n\n## Known limitations\n\nThe type application operator `$` is able to transform most types correctly, including functions, however there are a few edge cases:\n- Polymorphic functions will get nerfed. For example:\n  ```ts\n  type Id = <A>(x: A) => A\n  type NerfedId = $<Id, []>;\n  // type NerfedId = (x_0: {}) => {}\n  ```\n  Not what you wanted! Unfortunately TypeScript's conditional types don't currently allow analyzing and reconstructing the type parameters of a function ([this feature](https://github.com/Microsoft/TypeScript/issues/5453) might solve that).\n- Tuples `[A, B, ...]` are transformed correctly up to size 10 (though we can add arbitrarily many more as needed), after which they will be transformed into an array `(A | B | ...)[]`. Correspondingly, functions of arity <= 10 are supported.\n- In some cases the `join` method of `Monad` [must be supplied a type parameter](https://github.com/pelotom/hkts/blob/5ba4734bef74e9c2b8a10a75cb1de9ce230bde37/src/index.spec.ts#L23)... I've filed [an issue about this](https://github.com/Microsoft/TypeScript/issues/26807). The good news is it's still safe; you can't provide a _wrong_ type argument without getting an error.\n\n## Related work\n\nOther notable attempts to solve this problem:\n\n- https://medium.com/@gcanti/higher-kinded-types-in-typescript-static-and-fantasy-land-d41c361d0dbe\n- https://github.com/SimonMeskens/TypeProps\n"
  },
  {
    "path": "jest.config.js",
    "content": "module.exports = {\n  clearMocks: true,\n  coverageDirectory: 'coverage',\n  globals: {\n    'ts-jest': {\n      tsConfigFile: 'tsconfig.json',\n    },\n  },\n  moduleFileExtensions: ['ts', 'tsx', 'js'],\n  testEnvironment: 'node',\n  testMatch: ['<rootDir>/src/**/*.spec.ts'],\n  transform: {\n    '^.+\\\\.(ts|tsx)$': 'ts-jest',\n  },\n};\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"hkts\",\n  \"version\": \"0.3.1\",\n  \"description\": \"A simple encoding of higher-kinded types in TypeScript\",\n  \"keywords:\": [\n    \"typescript\",\n    \"higher\",\n    \"kinded\",\n    \"types\"\n  ],\n  \"main\": \"./lib/index.js\",\n  \"types\": \"./lib/index.d.ts\",\n  \"author\": \"Thomas Crockett\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@types/jest\": \"^23.3.1\",\n    \"jest\": \"^23.5.0\",\n    \"prettier\": \"^1.14.2\",\n    \"ts-jest\": \"^23.1.4\",\n    \"typescript\": \"^3.0.1\"\n  },\n  \"scripts\": {\n    \"build\": \"tsc\",\n    \"format\": \"prettier $([ \\\"$CI\\\" == true ] && echo --list-different || echo --write) './**/*.{ts,tsx,js,json,css}'\",\n    \"test\": \"jest $([ \\\"$CI\\\" == true ] && echo --no-cache --verbose --coverage)\"\n  }\n}\n"
  },
  {
    "path": "src/index.spec.ts",
    "content": "import { Bifunctor, Monad, _, _0, _1 } from '.';\n\nit('array', () => {\n  const { map, join } = Monad<_[]>({\n    of: x => [x],\n    chain: (f, xs) => xs.map(f).reduce((xs, ys) => xs.concat(ys), []),\n  });\n\n  const result = map(n => n + 1, join([[42]]));\n  expect(result).toEqual([43]);\n});\n\nit('maybe', () => {\n  type Maybe<A> = { tag: 'none' } | { tag: 'some'; value: A };\n  const none: Maybe<never> = { tag: 'none' };\n  const some = <A>(value: A): Maybe<A> => ({ tag: 'some', value });\n\n  const { map, join } = Monad<Maybe<_>>({\n    of: some,\n    chain: (f, maybe) => (maybe.tag === 'none' ? none : f(maybe.value)),\n  });\n\n  const result = map(n => n + 1, join<number>(some(some(42))));\n  expect(result).toEqual(some(43));\n});\n\nit('list', () => {\n  type List<A> = { tag: 'nil' } | { tag: 'cons'; head: A; tail: List<A> };\n  const nil: List<never> = { tag: 'nil' };\n  const cons = <A>(head: A, tail: List<A> = nil): List<A> => ({ tag: 'cons', head, tail });\n  const concat = <A>(xs: List<A>, ys: List<A>): List<A> =>\n    xs.tag === 'nil' ? ys : cons(xs.head, concat(xs.tail, ys));\n  const chainList = <A, B>(f: (x: A) => List<B>, xs: List<A>): List<B> =>\n    xs.tag === 'nil' ? nil : concat(f(xs.head), chainList(f, xs.tail));\n\n  const { map, join } = Monad<List<_>>({\n    of: x => cons(x, nil),\n    chain: chainList,\n  });\n\n  const result = map(n => n + 1, join<number>(cons(cons(42))));\n  expect(result).toEqual(cons(43));\n});\n\ndescribe('either', () => {\n  type Either<A, B> = { tag: 'left'; left: A } | { tag: 'right'; right: B };\n  const left = <A>(left: A): Either<A, never> => ({ tag: 'left', left });\n  const right = <B>(right: B): Either<never, B> => ({ tag: 'right', right });\n\n  it('bifunctor', () => {\n    const { bimap, first, second } = Bifunctor<Either<_0, _1>>({\n      bimap: (f, g, either) =>\n        either.tag === 'left' ? left(f(either.left)) : right(g(either.right)),\n    });\n\n    const l = (x: number): boolean => !(x % 2);\n    const r = (y: boolean): string => String(y);\n\n    const input1: Either<number, boolean> = left(2);\n    const result1 = bimap(l, r, input1);\n    expect(result1).toEqual(left(true));\n\n    const input2: Either<number, boolean> = right(true);\n    const result2 = bimap(l, r, input2);\n    expect(result2).toEqual(right('true'));\n\n    expect(first(result2).map(x => !x, result2)).toEqual(right('true'));\n    expect(second(result2).map(x => x.length, result2)).toEqual(right(4));\n  });\n\n  it('monad', () => {\n    const RightMonad = <L>() =>\n      Monad<Either<L, _>>({\n        of: right,\n        chain: (f, either) => (either.tag === 'left' ? either : f(either.right)),\n      });\n\n    const either = right(42);\n    const result = RightMonad().map(n => n + 1, either);\n    expect(result).toEqual(right(43));\n  });\n});\n"
  },
  {
    "path": "src/index.ts",
    "content": "declare const index: unique symbol;\n\n/**\n * Placeholder representing an indexed type variable.\n */\nexport interface _<N extends number = 0> {\n  [index]: N;\n}\nexport type _0 = _<0>;\nexport type _1 = _<1>;\nexport type _2 = _<2>;\nexport type _3 = _<3>;\nexport type _4 = _<4>;\nexport type _5 = _<5>;\nexport type _6 = _<6>;\nexport type _7 = _<7>;\nexport type _8 = _<8>;\nexport type _9 = _<9>;\n\ndeclare const fixed: unique symbol;\n\n/**\n * Marks a type to be ignored by the application operator `$`. This is used to protect\n * bound type parameters.\n */\nexport interface Fixed<T> {\n  [fixed]: T;\n}\n\n/**\n * Type application (simultaneously substitutes all placeholders within the target type)\n */\n// prettier-ignore\nexport type $<T, S extends any[]> = (\n  T extends Fixed<infer U> ? { [indirect]: U } :\n  T extends _<infer N> ? { [indirect]: S[N] } :\n  T extends undefined | null | boolean | string | number ? { [indirect]: T } :\n  T extends (infer A)[] & { length: infer L } ? {\n    [indirect]: L extends keyof TupleTable\n      ? TupleTable<T, S>[L]\n      : $<A, S>[]\n  } :\n  T extends (...x: infer I) => infer O ? { [indirect]: (...x: $<I, S>) => $<O, S> } :\n  T extends object ? { [indirect]: { [K in keyof T]: $<T[K], S> } } :\n  { [indirect]: T }\n)[typeof indirect];\n\n/**\n * Used as a level of indirection to avoid circularity errors.\n */\ndeclare const indirect: unique symbol;\n\n/**\n * Allows looking up the type for a tuple based on its `length`, instead of trying\n * each possibility one by one in a single long conditional.\n */\n// prettier-ignore\ntype TupleTable<T extends any[] = any, S extends any[] = any> = {\n  0: [];\n  1: T extends [\n      infer A0\n    ] ? [\n      $<A0, S>\n    ] : never\n  2: T extends [\n      infer A0, infer A1\n    ] ? [\n      $<A0, S>, $<A1, S>\n    ] : never\n  3: T extends [\n      infer A0, infer A1, infer A2\n    ] ? [\n      $<A0, S>, $<A1, S>, $<A2, S>\n    ] : never\n  4: T extends [\n      infer A0, infer A1, infer A2, infer A3\n    ] ? [\n      $<A0, S>, $<A1, S>, $<A2, S>, $<A3, S>\n    ] : never\n  5: T extends [\n      infer A0, infer A1, infer A2, infer A3, infer A4\n    ] ? [\n      $<A0, S>, $<A1, S>, $<A2, S>, $<A3, S>, $<A4, S>\n    ] : never\n  6: T extends [\n      infer A0, infer A1, infer A2, infer A3, infer A4, infer A5\n    ] ? [\n      $<A0, S>, $<A1, S>, $<A2, S>, $<A3, S>, $<A4, S>, $<A5, S>\n    ] : never\n  7: T extends [\n      infer A0, infer A1, infer A2, infer A3, infer A4, infer A5, infer A6\n    ] ? [\n      $<A0, S>, $<A1, S>, $<A2, S>, $<A3, S>, $<A4, S>, $<A5, S>, $<A6, S>\n    ] : never\n  8: T extends [\n      infer A0, infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, infer A7\n    ] ? [\n      $<A0, S>, $<A1, S>, $<A2, S>, $<A3, S>, $<A4, S>, $<A5, S>, $<A6, S>, $<A7, S>\n    ] : never\n  9: T extends [\n      infer A0, infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, infer A7, infer A8\n    ] ? [\n      $<A0, S>, $<A1, S>, $<A2, S>, $<A3, S>, $<A4, S>, $<A5, S>, $<A6, S>, $<A7, S>, $<A8, S>\n    ] : never\n  10: T extends [\n      infer A0, infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, infer A7, infer A8, infer A9\n    ] ? [\n      $<A0, S>, $<A1, S>, $<A2, S>, $<A3, S>, $<A4, S>, $<A5, S>, $<A6, S>, $<A7, S>, $<A8, S>, $<A9, S>\n    ] : never\n}\n\nexport * from './static-land';\n"
  },
  {
    "path": "src/static-land.ts",
    "content": "import { $, _ } from '.';\n\nexport interface Setoid<T> {\n  equals: (x: T, y: T) => boolean;\n}\n\nexport interface Ord<T> extends Setoid<T> {\n  lte: (x: T, y: T) => boolean;\n}\n\nexport interface Semigroup<T> {\n  concat: (x: T, y: T) => T;\n}\n\nexport interface Monoid<T> extends Semigroup<T> {\n  empty: () => T;\n}\n\nexport interface Group<T> extends Monoid<T> {\n  invert: (x: T) => T;\n}\n\nexport interface Semigroupoid<T> {\n  compose: <I, J, K>(tij: $<T, [I, J]>, tjk: $<T, [J, K]>) => $<T, [I, K]>;\n}\n\nexport interface Category<T> extends Semigroupoid<T> {\n  id: <I, J>() => $<T, [I, J]>;\n}\n\nexport interface Filterable<T> {\n  filter: <A>(pred: (x: A) => boolean, ta: $<T, [A]>) => $<T, [A]>;\n}\n\nexport interface Functor<T> {\n  map: <A, B>(f: (x: A) => B, t: $<T, [A]>) => $<T, [B]>;\n}\nexport const Functor = <T>(spec: Functor<T>) => spec;\n\nexport interface Bifunctor<T> {\n  bimap: <A, B, C, D>(f: (x: A) => B, g: (x: C) => D, t: $<T, [A, C]>) => $<T, [B, D]>;\n  first: <A, B>(t: $<T, [A, B]>) => Functor<$<T, [_, B]>>;\n  second: <A, B>(t: $<T, [A, B]>) => Functor<$<T, [A, _]>>;\n}\nexport const Bifunctor = <T>({ bimap }: Pick<Bifunctor<T>, 'bimap'>): Bifunctor<T> => ({\n  bimap,\n  first: <A, B>(t: $<T, [A, B]>) => ({\n    map: (f, u) => bimap(f, x => x, u),\n  }),\n  second: <A, B>(t: $<T, [A, B]>) => ({\n    map: (f, u) => bimap(x => x, f, u),\n  }),\n});\n\nexport interface Contravariant<T> {\n  contramap: <A, B>(f: (x: A) => B, t: $<T, [B]>) => $<T, [A]>;\n}\n\nexport interface Profunctor<T> {\n  promap: <A, B, C, D>(f: (x: A) => B, g: (x: C) => D, t: $<T, [B, C]>) => $<T, [A, D]>;\n}\n\nexport interface Apply<T> extends Functor<T> {\n  ap: <A, B>(tf: $<T, [(x: A) => B]>, ta: $<T, [A]>) => $<T, [B]>;\n}\n\nexport interface Applicative<T> extends Apply<T> {\n  of: <A>(x: A) => $<T, [A]>;\n}\nexport const Applicative = <T>(spec: Pick<Applicative<T>, 'ap' | 'of'>): Applicative<T> => ({\n  ...spec,\n  map: (f, u) => spec.ap(spec.of(f), u),\n});\n\nexport interface Alt<T> extends Functor<T> {\n  alt: <A>(x: $<T, [A]>, y: $<T, [A]>) => $<T, [A]>;\n}\n\nexport interface Plus<T> extends Alt<T> {\n  zero: <A>() => $<T, [A]>;\n}\n\nexport interface Alternative<T> extends Applicative<T>, Plus<T> {}\n\nexport interface Chain<T> extends Apply<T> {\n  chain: <A, B>(f: (x: A) => $<T, [B]>, t: $<T, [A]>) => $<T, [B]>;\n}\nexport const Chain = <T>(spec: Pick<Chain<T>, 'chain'> & Pick<Functor<T>, 'map'>): Chain<T> => ({\n  ...spec,\n  ap: (uf, ux) => spec.chain(f => spec.map(f, ux), uf),\n});\n\nexport interface Monad<T> extends Applicative<T>, Chain<T> {\n  join: <A>(tt: $<T, [$<T, [A]>]>) => $<T, [A]>;\n}\nexport const Monad = <T>({\n  of,\n  chain,\n}: Pick<Applicative<T>, 'of'> & Pick<Chain<T>, 'chain'>): Monad<T> => ({\n  of,\n  ...Chain({ chain, map: (f, t) => chain(x => of(f(x)), t) }),\n  join: tt => chain(t => t, tt),\n});\n\nexport interface Foldable<T> {\n  reduce: <A, B>(f: (x: A, y: B) => A, x: A, u: $<T, [B]>) => A;\n}\n\nexport interface Extend<T> extends Functor<T> {\n  extend: <A, B>(f: (t: $<T, [A]>) => B, t: $<T, [A]>) => $<T, [B]>;\n}\n\nexport interface Comonad<T> extends Extend<T> {\n  extract: <a>(t: $<T, [a]>) => a;\n}\n\nexport interface Traversable<T> extends Functor<T>, Foldable<T> {\n  traverse: <U, A, B>(a: Applicative<U>, f: (x: A) => $<U, [B]>, t: $<T, [A]>) => $<U, [$<T, [B]>]>;\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Basic Options */\n    \"target\": \"es5\",                          /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */\n    \"module\": \"commonjs\",                     /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */\n    // \"lib\": [],                             /* Specify library files to be included in the compilation. */\n    // \"allowJs\": true,                       /* Allow javascript files to be compiled. */\n    // \"checkJs\": true,                       /* Report errors in .js files. */\n    // \"jsx\": \"preserve\",                     /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */\n    \"declaration\": true,                      /* Generates corresponding '.d.ts' file. */\n    // \"declarationMap\": true,                /* Generates a sourcemap for each corresponding '.d.ts' file. */\n    // \"sourceMap\": true,                     /* Generates corresponding '.map' file. */\n    // \"outFile\": \"./\",                       /* Concatenate and emit output to single file. */\n    \"outDir\": \"lib\",                          /* Redirect output structure to the directory. */\n    // \"rootDir\": \"./\",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */\n    // \"composite\": true,                     /* Enable project compilation */\n    // \"removeComments\": true,                /* Do not emit comments to output. */\n    // \"noEmit\": true,                        /* Do not emit outputs. */\n    // \"importHelpers\": true,                 /* Import emit helpers from 'tslib'. */\n    // \"downlevelIteration\": true,            /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */\n    // \"isolatedModules\": true,               /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */\n\n    /* Strict Type-Checking Options */\n    \"strict\": true,                           /* Enable all strict type-checking options. */\n    // \"noImplicitAny\": true,                 /* Raise error on expressions and declarations with an implied 'any' type. */\n    // \"strictNullChecks\": true,              /* Enable strict null checks. */\n    // \"strictFunctionTypes\": true,           /* Enable strict checking of function types. */\n    // \"strictPropertyInitialization\": true,  /* Enable strict checking of property initialization in classes. */\n    // \"noImplicitThis\": true,                /* Raise error on 'this' expressions with an implied 'any' type. */\n    // \"alwaysStrict\": true,                  /* Parse in strict mode and emit \"use strict\" for each source file. */\n\n    /* Additional Checks */\n    // \"noUnusedLocals\": true,                /* Report errors on unused locals. */\n    // \"noUnusedParameters\": true,            /* Report errors on unused parameters. */\n    // \"noImplicitReturns\": true,             /* Report error when not all code paths in function return a value. */\n    // \"noFallthroughCasesInSwitch\": true,    /* Report errors for fallthrough cases in switch statement. */\n\n    /* Module Resolution Options */\n    // \"moduleResolution\": \"node\",            /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */\n    // \"baseUrl\": \"./\",                       /* Base directory to resolve non-absolute module names. */\n    // \"paths\": {},                           /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */\n    // \"rootDirs\": [],                        /* List of root folders whose combined content represents the structure of the project at runtime. */\n    // \"typeRoots\": [],                       /* List of folders to include type definitions from. */\n    // \"types\": [],                           /* Type declaration files to be included in compilation. */\n    // \"allowSyntheticDefaultImports\": true,  /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */\n    \"esModuleInterop\": true                   /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */\n    // \"preserveSymlinks\": true,              /* Do not resolve the real path of symlinks. */\n\n    /* Source Map Options */\n    // \"sourceRoot\": \"\",                      /* Specify the location where debugger should locate TypeScript files instead of source locations. */\n    // \"mapRoot\": \"\",                         /* Specify the location where debugger should locate map files instead of generated locations. */\n    // \"inlineSourceMap\": true,               /* Emit a single file with source maps instead of having a separate file. */\n    // \"inlineSources\": true,                 /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */\n\n    /* Experimental Options */\n    // \"experimentalDecorators\": true,        /* Enables experimental support for ES7 decorators. */\n    // \"emitDecoratorMetadata\": true,         /* Enables experimental support for emitting type metadata for decorators. */\n  }\n}"
  }
]