Presenter: Alexis Lucattini, University of Melbourne Centre for Cancer Research (UMCCR) @alexiswl
- Session 2: (EMEA-APAC) Wednesday, March 1st 07:00 - 11:00 UTC / 16:00 - 20:00 Japanese Standard Time
- Session 3: (APAC-Americas) Thursday, March 2nd 19:00 - 23:00 US EST
Friday, March 3rd 00:00 - 04:00 UTC / 09:00 - 13:00 Japanese Standard Time
Widespread use of CWL JavaScript Expressions is often restricted to simple one-line code fragments.
It is without dispute that writing complex, yet easily readable, ES5.1 conformant, JS code for CWL is inherently very difficult.
For many developers, interaction with CWL objects such as File, Dirent, Directory or custom-made schemas can prove to be a steep-learning curve.
It is therefore no surprise that writing complex CWL JS expressions is generally discouraged.
It is, however, sometimes necessary.In this presentation we introduce the concept of writing our CWL JS expressions in TypeScript.
We will discuss the benefits of this approach, such as:
- type-hinting for CWL Objects,
- compatible βtranspilationβ,
- unit-testing with the jest framework
- auto TypeScript-Interface creation for custom CWL Schemas.
We will view some simple and complex use-cases of CWL JS Expressions, the selection of open CWL TS packages and some caveats to consider for TypeScript in CWL.
We will conclude by noting that writing complex CWL JS expressions is a difficult task and alternative options should be considered. Using TypeScript may alleviate some existing challenges faced by developers writing CWL JS expressions.
- Slides: https://bit.ly/typescript-in-cwl-powerpoint
- CWL-ICA GitHub Repository: https://github.com/umccr/cwl-ica
- Releases Page: https://github.com/umccr/cwl-ica/releases
- TypeScript Wiki Page: https://github.com/umccr/cwl-ica/wiki/TypeScript
- cwl-ica cli code base: https://github.com/umccr/cwl-ica-cli
- Jest Testing Framework: https://jestjs.io/
- Comparison of rabix cwlts vs cwl-ts-auto TypeScript modules: https://github.com/common-workflow-lab/cwl-ts-auto/issues/23
Please leave your questions for the presenter below!
As an alternative to YouTube, this presentations is also available on ConfTube