Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

typescript peer dependency to low for successful compilation #4106

Closed
eps1lon opened this issue Aug 9, 2018 · 0 comments · Fixed by #4771
Closed

typescript peer dependency to low for successful compilation #4106

eps1lon opened this issue Aug 9, 2018 · 0 comments · Fixed by #4771

Comments

@eps1lon
Copy link
Contributor

eps1lon commented Aug 9, 2018

Bug Report

  • TSLint version: 5.11.0
  • TypeScript version: 2.1.6
  • Running TSLint via: Node.js API

TSLint cannot be used programmatically in a typescript project with typescript<2.3.0 despite peerDependencies listing typescript >= 2.1.0 i.e. writing a rule for TSLint with typescript@~2.1.0 results in a compilation error:

node_modules/tslint/lib/language/utils.d.ts(52,57): error TS1005: ',' expected.
node_modules/tslint/lib/language/utils.d.ts(52,61): error TS1005: ',' expected.

Cause of this is

export function ancestorWhere<T extends ts.Node = ts.Node>(

Generic argument defaults where added in typescript 2.3.

Unfortunately this method is part of the public API which might cause trouble if we remove the default. Removing this default results in a successful build with 2.1.

Repro: eps1lon/tslint-issue-typescript-peer-version

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants