Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Wanted: TypeScript Conversion Update #6377

Open
bigtimebuddy opened this issue Feb 1, 2020 · 1 comment
Open

Help Wanted: TypeScript Conversion Update #6377

bigtimebuddy opened this issue Feb 1, 2020 · 1 comment

Comments

@bigtimebuddy
Copy link
Member

@bigtimebuddy bigtimebuddy commented Feb 1, 2020

Hello PixiJS Community,

We have reach a major milestone in converting PixiJS to TypeScript by converting core and all it dependencies. Now that we are over this hump, we can start on the rest of the packages that dependency on this small set of core packages.

We could definitely use a hand from devs to convert the rest of these packages. If you are interested in converting a package, please let me know which one. There are a few guidelines for converting packages, which you can see from the existing completed PRs.

Converting Gotchyas

  • We are trying to maintain the JSDocs until everything is completed, and then convert to Typedoc and emit types afterwards. We ask that you maintain JSDocs and make sure that they still build and show up correctly via npm run docs
  • Please use git mv to rename JS files to TS, or else we lose the Git history. Some Git GUIs may not pick up these changes.
  • Please do not add public access modifiers to internal-only methods or members, leave access undefined in these cases.

Packages

  • @pixi/accessibility #6379 In Progress @Zyie
  • @pixi/app #6376 In Progress @Zyie
  • @pixi/constants #6173
  • @pixi/core #6340, #6373
  • @pixi/display #6261, #6339, #6349, #6371
  • @pixi/extract #6381, In Progress @Zyie
  • @pixi/graphics #6352
  • @pixi/interaction
  • @pixi/loaders
  • @pixi/math #6141
  • @pixi/mesh-extras
  • @pixi/mesh #6382 In Progress @Zyie
  • @pixi/mixin-cache-as-bitmap
  • @pixi/mixin-get-child-by-name
  • @pixi/mixin-get-global-position
  • @pixi/particles
  • @pixi/polyfill
  • @pixi/prepare
  • @pixi/runner #6164
  • @pixi/settings #6315
  • @pixi/sprite-animated
  • @pixi/sprite-tiling
  • @pixi/sprite #6375 In Progress @Zyie
  • @pixi/spritesheet
  • @pixi/text-bitmap
  • @pixi/text
  • @pixi/ticker #6186
  • @pixi/unsafe-eval
  • @pixi/utils #6262
  • @pixi/canvas-display
  • @pixi/canvas-extract
  • @pixi/canvas-graphics
  • @pixi/canvas-mesh
  • @pixi/canvas-particles
  • @pixi/canvas-prepare
  • @pixi/canvas-renderer
  • @pixi/canvas-sprite-tiling
  • @pixi/canvas-sprite
  • @pixi/canvas-text
  • @pixi/filter-alpha #6383 In Progress @Zyie
  • @pixi/filter-blur #6383 In Progress @Zyie
  • @pixi/filter-color-matrix #6383 In Progress @Zyie
  • @pixi/filter-displacement #6383 In Progress @Zyie
  • @pixi/filter-fxaa #6383 In Progress @Zyie
  • @pixi/filter-noise #6383 In Progress @Zyie

Bundles

  • pixi.js-legacy
  • pixi.js
@ivanpopelyshev

This comment has been minimized.

Copy link
Member

@ivanpopelyshev ivanpopelyshev commented Feb 3, 2020

More tips:

  • Try to put all extra import's (actually its import type) separate from existing imports. We'll add import type when new TS version rolls out. However linter will stop you from using two lines of import from same module, its fine to mix them in that case.

  • You may use both Array<X> and X[] notations, I usually use Array<X> for structures that are pushed-popped often (aka Lists). X[] for things that have fixed small length or if size is decided at the same place they are constructed (regular array).

  • If readonly field is changed only in destroy() - you can use any conversion there. If its used somewhere else - remove readonly. We can decide whether to make it a private field + readonly property later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.