Closed RJWadley closed 4 months ago
with typescript: useAsset(url) throws a type error: Expected 2 arguments, but got 1
useAsset(url)
useAsset(url) is valid, and should produce no type errors
install pixi react at dev: npm install @pixi/react@dev create a new file with the following code:
npm install @pixi/react@dev
// sample.ts const asset = https://pixijs.com/assets/bunny.png useAsset(asset)
run typescript checking on this file, you should see a type error
@pixi/react
pixi.js
React
ReactDOM
onProgress should be optional: onProgress?: ProgressCallback
onProgress?: ProgressCallback
No response
:tada: This issue has been resolved in version 8.0.0-beta.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Current Behavior
with typescript:
useAsset(url)
throws a type error: Expected 2 arguments, but got 1Expected Behavior
useAsset(url)
is valid, and should produce no type errorsSteps to Reproduce
install pixi react at dev:
npm install @pixi/react@dev
create a new file with the following code:run typescript checking on this file, you should see a type error
Environment
@pixi/react
version: 8.0.0-dev.6562a1epixi.js
version: 8.2.2React
version: 18.3.1ReactDOM
version: 18.3.1Possible Solution
onProgress should be optional:
onProgress?: ProgressCallback
Additional Information
No response