question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pixi.js@5.2.1 No typescript error if I use PIXI without importing it. Just runtime errror that is undefined.

See original GitHub issue

Expected Behavior

Typescript error

Current Behavior

No error

Possible Solution

I think you guys cast pixi as a global somehow

Steps to Reproduce

create new file and add

// No PIXI import new PIXI.Point()

No typescript error, but run time error.

Environment

  • pixi.js version: 5.2.1 “typescript@3.8.2”
  • Browser & Version: e.g. Chrome 67
  • OS & Version: e.g. Ubuntu 18.04
  • Running Example: url

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bigtimebuddycommented, Mar 14, 2020

That’s fair.

Another important quirk of our current typings is they are generated from JSDocs. This assumes global namespacing. This approach is just temporary for the time being until we can auto generate typings.

0reactions
stale[bot]commented, Jun 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pixi.js@5.2.1 No typescript error if I use PIXI without importing ...
The error appears to be that the current pixi.js.d.ts definitions pollute the global variable by declaring the PIXI namespaces without directly ...
Read more >
Pixi.js in SvelteKit gives a 'self is not defined' error only while ...
typescript - Pixi. js in SvelteKit gives a 'self is not defined' error only while building - Stack Overflow. Stack Overflow for Teams...
Read more >
react-pixi-fiber - npm
Sprite object into a Root Container of PIXI.Application on the page. The HTML-like syntax; called JSX is not required to use with this...
Read more >
property does not exist on type 'typeof import dynamic import
The dynamic import returns the module, not the element, as there can be multiple ... Typescript compile error: Property 'bodyParser' does not exist...
Read more >
pixijs - Bountysource
I'm trying to use this addon, but I'm getting errors like this one: DisplayGroup is not a constructor when I try to import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found