Uncaught TypeInfo not known for function Bar(foo)
See original GitHub issueI created a react app with --typescript install tsyringe and reflect-metadata and got this error
Uncaught TypeInfo not known for function Bar(foo)
import {container, injectable} from "tsyringe"
export class Foo {}
@injectable()
export class Bar {
constructor(public foo: Foo) {}
}
export const myBar = container.resolve(Bar);
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (3 by maintainers)
Top Results From Across the Web
Why is Foo not a function when I defined it? - Stack Overflow
Hopefully, this makes it obvious why 'foo is not a function'. Your bar function is declaring a new foo variable (which hides the...
Read more >test/e2e/sources/debugger-language-plugins_test.ts - devtools ...
extensionAPI: unknown, pluginImpl: TestPluginImpl, name: string, ... startsWith('[Formatter Errors]')), ['Uncaught No typeinfo for bar']);.
Read more >std::bad_cast - cppreference.com
An exception of this type is thrown when a dynamic_cast to a reference type fails the run-time check (e.g. because the types are...
Read more >COMPUTER SCIENCE I & II
Implicit init not allowed for constructor without args: A foo(); //error: declares a function foo. A foo; A bar = A(); //ok.
Read more >ctz - Documentation - The Zig Programming Language
In this case, the function bar cannot be called becuse the pointer to the non-ABI-aligned field mentions the bit offset, but the function...
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
If you stumble upon this issue outside of React, be sure that the service you’re resolving has a
@injectable()
decorator.Do you have the following in your
tsconfig.json
?