Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit does the initial conversion of the library to TypeScript, without too many strict types and no runtime changes. This will significantly lower the burden of TypeScript developers wishing to use cql-execution, as they no longer have to define custom .d.ts files to make the TypeScript compiler happy. All types are now exported from cql-execution itself when publishing. Basically all of these changes will not be seen by any non-TypeScript projects consuming the library, as most of the changes are development-focused, with a few new dependencies, and using tsc over babel This commit was squashed from the following commits (see PR #260 for details): * WIP: rename files for later additions * Initial working ts commit * Set up TS infrastructure * Updated all files to proper TS * Add low-hanging fruit types * Used any for all complex types * Fix luxon types to v1.x; add self to contributors * Update examples and fix optional param * remove babel config * Update cql4Browsers * Yarn audit fix * Switch parseInt calls to Number.isInteger * Yarn audit fix * yarn --> npm * Update grep of validate_cql4browsers to include file extension * Update CI to npm over yarn * Type and infra improvements * Fix args that should have been optional * Add stricter typing of execution parameters * Switch to prepare over prepublish * Export types directory from cql.ts * Add default exports * Fix overloaded import since Length class moved * Simplify usage of accessing built in Math functions * Apply suggestions from code review * Fix easy type updates * Properly mark optional params Co-authored-by: Chris Moesel <cmoesel@users.noreply.github.com> * Quick updates from code review * Update PR template to use npm * Remove prepend flag from npm scripts * Properly mark patient attribute as potentially undefined * Missed an optional version * Add stricter type to datetime functions * Unify luxon imports in datetime * Add interfaces specifying CodeService and Data Provider structure * Used access type modifiers in select constructors * Regen cql4browsers and add npm build as prereq to browserify * Better type support * Rename types files * Add strict typing to executor and context args * Update example to use typescript import with comment * Remove redundant constructor assignments * move to inline exports * Update findValueSet to use consistent type when not found * Update structure of exposed API * Rename runtime-types -> runtime.types * update cql4browsers * Add comment explaining overrides * Added TODO for future refactors of datetime * Reworked unit conversion to use clearer type checking * removed patients from DataProvider * added abstract base class for Date and DateTime * Add more proper typing * Require _is and _typeHierarchy * Add interfaces for TypeSpecifier structures * Make Concept default codes to [] when null * Make ValueSet default codes to [] when null * Properly mark code as type string in messageListeners.ts * Update docs * Add information about TypeScript conversion * Update examples to include TypeScript and proper JavaScript * Update CI bade to GH Actions over travis * Update command to generate cql4browsers * A fitting end to this work: a typo
- Loading branch information
Matthew Gramigna
committed
Feb 21, 2022
1 parent
b0f5307
commit 4e1c56a
Showing
127 changed files
with
18,235 additions
and
22,063 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extension": ["ts"], | ||
"require": "ts-node/register" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.