TS2304 compilation errors when using 'describe' scoped variables
See original GitHub issueHello First, thanks for your work on as-pect. I am quite an assemblyscript newbie, I am not sure this is a real as-pect issue but when I declare a variable inside a describe block I cannot use it inside a testcase function:
describe("....", () => {
const value: u8 = 42;
it("should work", () => {
expect<u8>(value).toBe(40 + 2);
});
I get a compilation error as below:
ERROR TS2304: Cannot find name 'value'.
expect<u8>(value).toBe(40 + 2);
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
TypeScript getting error TS2304: cannot find name ' require'
I am getting the error "TS2304: Cannot find name 'require' " when I attempt to transpile a simple TypeScript Node.js page. I have...
Read more >declare var test on global scope issue #1537 - GitHub
Both libraries have a test declaration on global scope, so TypeScript is throwing the following error: Error TS2403: Subsequent variable ...
Read more >TypeScript errors and how to fix them
Below you find a list of common TypeScript errors along with the buggy code and its fixed ... Alternatively you can define a...
Read more >cannot find name 'expect'.ts(2304) - You.com | The AI Search ...
You can search for the packages using the Definitely Typed package search. Open side panel. Error: TSError: ⨯ Unable to compile TypeScript.
Read more >Trying TypeScript | Better world by better software
Setting up and starting with TypeScript and Visual Studio Code editor. ... We can catch this error using TypeScript compiler (and even ...
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
This is likely due to https://github.com/AssemblyScript/assemblyscript/issues/798
Closed stale. Feel free to reopen if there’s issues.