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

Workaround for #1400. Excludes imported properties from error #1620

Merged

Conversation

IllusionMH
Copy link
Contributor

As I stated in comment for issue #1400 - difference with TS 2.x because languageService.getDocumentHighlights highlights not only nodes for ITest but also for unknown. I don't know if it is regression in TS or how it is supposed to filtered in new way.

This fix tracks positions for imported properties and prevents errors if it is "highlighted" as use before declarations.

I'd be glad to improve fix if you have any suggestions.

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @IllusionMH! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@IllusionMH
Copy link
Contributor Author

PR #1608 fixes issue #1400 if linterOptions have "typeCheck": true and both TestInterface.ts and Test are provided.
Therefore this PR is only relevant for typeless (or untyped. What is correct version?) rules.

@nchen63
Copy link
Contributor

nchen63 commented Nov 24, 2016

@IllusionMH very nice

@nchen63 nchen63 merged commit 3609b2e into palantir:master Nov 24, 2016
@IllusionMH IllusionMH deleted the no-use-before-declare-fix-imports branch November 27, 2016 01:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants