Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS2440 caused by conflicting local and imported type #61

Closed
rcjsuen opened this issue Dec 6, 2019 · 0 comments
Closed

TS2440 caused by conflicting local and imported type #61

rcjsuen opened this issue Dec 6, 2019 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Dec 6, 2019

Changing the package.json file to use TypeScript 3.7 seems to create an new TS2440 import error. Previous versions of TypeScript allowed this duplication to exist but it is now being flagged as a bug in 3.7.

$ npm install
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> dockerfile-ast@0.0.17 prepublish /Users/remy.suen/code/github/dockerfile-ast
> tsc -p ./src

src/main.ts:93:10 - error TS2440: Import declaration conflicts with local declaration of 'ImageTemplate'.

93 import { ImageTemplate } from './imageTemplate';
            ~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant