Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

Re-emit inconsistency for ISubType #32

Closed
ikatyang opened this issue Aug 12, 2017 · 0 comments
Closed

Re-emit inconsistency for ISubType #32

ikatyang opened this issue Aug 12, 2017 · 0 comments
Labels

Comments

@ikatyang
Copy link
Owner

Version

  • dts-element v2.2.0
  • typescript v2.4.2

Code

import * as ts from 'typescript';
import * as dts from 'dts-element';

const source = `type X = A[B[C]];`;
const sourceFile = ts.createSourceFile(
  'test.ts',
  source,
  ts.ScriptTarget.Latest,
  false,
  ts.ScriptKind.TS,
);

console.log('[ts]', ts.createPrinter().printFile(sourceFile));
console.log('[dts]', dts.emit(dts.parse(source)));

Expected

[ts] type X = A[B[C]];
[dts] type X = A[B[C]];

Actual

[ts] type X = A[B[C]];
[dts] type X = A[B[C]][C];
@ikatyang ikatyang added the bug label Aug 12, 2017
@ikatyang ikatyang changed the title Re-emit inconsistency Re-emit inconsistency for ISubType Aug 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant