error TS1036: Statements are not allowed in ambient contexts.
See original GitHub issueVersions
- vee-validate: 2.1.0-beta.1
- vue: 2.5.16
Describe the bug node_modules/vee-validate/types/vee-validate.d.ts(163,2): error TS1036: Statements are not allowed in ambient contexts. will be printed when executing npx tsc --noEmit --allowSyntheticDefaultImports false
To Reproduce Steps to reproduce the behavior:
- Create a new npm project
- Add typescript in Version 2.8.4
- Add vee-validate in Version 2.1.0-beta.1
- Add a tsconfig.json as descripted in Additional context
- Execute npx tsc --noEmit --allowSyntheticDefaultImports false
Expected behavior node_modules/vee-validate/types/vee-validate.d.ts(163,2): error TS1036: Statements are not allowed in ambient contexts. will be printed when executing npx tsc --noEmit --allowSyntheticDefaultImports false
Desktop (please complete the following information):
- OS: Linux (Ubuntu 18.04)
- Node Version: 10.3.0
- NPM Version: 6.1.0
- Typescript Version: 2.8.4
Additional context tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"strict": true,
"lib": [
"esnext",
"dom",
"dom.iterable"
],
"outDir": "built"
},
"include": [
"./src/**/*.ts",
"./src/**/*.vue"
],
"exclude": [
"./node_modules",
"./built"
]
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Statements are not allowed in ambient contexts
These two things combined together are the problem: I made a index.d.ts file. I am trying to assign a function to String.prototype.
Read more >error TS1036: Statements are not allowed in ambient ...
Hi, I'm having an issue when i'm trying to start my nativescript project. It happens every time just after I add firebase plugin...
Read more >Microsoft/TypeScript
... recieve the error TS1036: Statements are not allowed in ambient contexts . ... is like a header file except it can only...
Read more >[SOLVED] An Implementation Cannot Be Declared in ...
Ambient declarations only exist in the type system and are erased at runtime, so they are not meant to contain implementations. The car...
Read more >TypeScript errors and how to fix them
error TS1036: Statements are not allowed in ambient contexts. Broken Code ❌. 1 2 3 4 5
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Unfortunately I Will not be able to publish a release until Sunday. Will check if a team member can.
On Wed, 6 Jun 2018, 15:22 Luca Steeb, notifications@github.com wrote:
Thanks for fixing. Can you please publish on npm?