Commit Graph

6 Commits

Author SHA1 Message Date
Michael Rogers
f51d47c0e4 refactor: format with prettier 2023-06-23 15:52:03 -05:00
Jesse Mazzella
41fc502564
Generate type declarations for CompositionAPI and publish with OpenMCT (#5838)
* add typescript

* update tsconfig

* convert to es6 class

* Convert more stuff to es6 class

* skip checking libs, test files

* more es6 classes!

* Fix some jsdocs

* Rename file

* Improve jsdoc types

* Rename references as well

* more types

* types for CompositionAPI

* Types for CompositionCollection

* Types for CompositionProvider

* type

* types for api

* nvm

* cleanup MCT

* Fix API type definition

* Generate types before publish

* fix openmct 👀

* rename PublicAPI -> OpenMCT and document methods

* try and fix visual test ?

* Make private methods private

* more private methods!!

* import all es6 api's so we get more types for free

* convert Selection to es6 class

* remove redundant docs

* fix Branding types

* fix openmct.start() types

* Remove useless `@memberof`

* Add parameter name

* [docs] Add a section on Types

* markdownlint

* word

* Add section on limitations / contibuting types

* Let these methods be private

* make private members private, fix a type

* fix another type

* Make method private

* Update docs for `skipMutate` and related methods

* Rename file and fix references

* `DefaultCompositionProvider` extends `CompositionProvider`

* Make private members private

* Type for `AbortSignal`

* `domainObject` must be accessible for perf tests

Co-authored-by: Andrew Henry <akhenry@gmail.com>
2022-10-21 17:29:52 -07:00
Jesse Mazzella
cae579f5b3
Add baseUrl, outDir, and exclude options (#5757)
- Fixes erroneous TS language server warnings showing up in the VSCode terminal

- Ensures TypeScript language server features (such as refactor) are able to work properly by excluding build files
2022-09-14 10:05:41 -07:00
Joe Pea
651e61954c
Type annotations (#4789)
* add some types to XAxisModel

* some more type defs and small code tweaks while getting familiar with plots

* more type annotations and a few small tweaks

* more type annotations and small tweaks to make types show

* add mocha types

* Add karma and jasmine, too

* further simplify plot canvas creation

* further simplify plot canvas creation

* update types, avoid runtime behavior in type definition that breaks SeriesCollection

* undo the changes to MctChart, improve it later

* lint fix

Co-authored-by: unlikelyzero <jchill2@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
2022-03-29 14:39:49 -07:00
Joe Pea
6bcc9bfd84
turn off errors from type checking in IDEs by default. Turn it on locally to type check (#4705)
Co-authored-by: Joe Pea <joe.pea@nasa.gov>
2022-01-11 11:40:51 -08:00
John Hill
b3ab56cb57
Move off node10 and add intellisense (#4643)
* Move off node10 and bring in node16

* Update engine lock

* update webpack and add the output.hashFunction option to avoid a potential issue with Node 17 in case the config changes closer to defaults

At the moment there is no error with Node 17 because the config strays from the defaults and avoids the common case.

Also add a tsconfig.json file that enables VS Code and other IDEs to perform type checking on the side. For example now the webpack config file is type checked. This does not impact any existing processes, our build scripts are left untouched and only IDEs will use it for live intellisense and type checking when viewing files (f.e. showing helpful red squiggly underlines on type errors)

* mini-css-extract-plugin

* Update webpack.prod.js

* Update webpack.prod.js

* 15

* Update config.yml

* Updated config.yml

* Updated config.yml

* Updated config.yml

* Update package.json

* comment and EOF

Co-authored-by: Joe Pea <joe.pea@nasa.gov>
Co-authored-by: Joe Pea <trusktr@gmail.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
2022-01-07 11:39:25 -08:00