Skip to content
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

feature(typescript) #3688



None yet
2 participants
Copy link

commented Mar 26, 2019

Introduce build step to dynamically generate Typescript Typings (.d.ts) from JSON API files. Currently Utils are statically declared as there are not any JSON APIs defined.

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:
Defined explicit Typescript types for all of Quasar may cause consuming TS code that is not typed correctly to have a compile error. This is expected since any TS consumers today will use a shim that declares all Quasar types of type 'any'.

The PR fulfills these requirements:

  • It's submitted to the dev branch and not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested with all Quasar themes
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on a Electron app
  • Any necessary documentation has been added or updated in the docs (for faster update click on "Suggest an edit on GitHub" at bottom of page) or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

outofmemoryagain and others added some commits Mar 14, 2019

Type Definition Generation Build Script
Initial version of Type Definition Generation Build Script add to the Quasar build pipeline
Fix type errors and move to types directory
Fix type errors and move to types directory
Update Quasar Type Defs
Update Quasar Type Defs to include Utitlities and to modify structure to follow pattern used by Vuejs.
Add prefetch to ComponentOptions
Extent Vue type definition to add prefetch to ComponentOptions.
Update Date Uitils Options
Update Date Uitils Options from V.17 types to V1
Add additional utility types
Add additional utility types: colors, date, dom, event, format, scroll, and other.
Update component const types
Update component const types to support use as mixins
Expand Object definitions
Expand Object definitions for properties and parameters
Update Notify API
Update Notify API.  Add definition of opts parameter for create and setDefaults methods.
Remove commented code
Remove commented code from utils.d.ts
Add meta property to component options
Extend Vue ComponentOptions to include the meta property.  This cannot be done dynamically as there is no way to define it as part of the plugin API JSON today.
Add method return types
Add method return types and general clean up.

@rstoenescu rstoenescu merged commit a795680 into quasarframework:dev Mar 26, 2019


This comment has been minimized.

Copy link

commented Mar 26, 2019

Really nice work! Thank you!

@outofmemoryagain outofmemoryagain deleted the outofmemoryagain:feature/typescript-typings branch Apr 2, 2019

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