-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bindgen): support string choices
Future todo: handle these as string enums.
- Loading branch information
Showing
5 changed files
with
69 additions
and
34 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
packages/core/typescript/itk-wasm/src/bindgen/canonical-type.js
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
function canonicalType(parameterType) { | ||
// Strip extras | ||
const canonical = parameterType.split(' ')[0] | ||
let canonical = parameterType.split(' ')[0] | ||
canonical = canonical.split(':')[0] | ||
return canonical | ||
} | ||
|
||
export default canonicalType | ||
export default canonicalType |
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