Summary
When using latest version of CASA with TypeScript, I get a compilation error. CasaTemplateLoader``getSource function has incompatible return type.
FileSystemLoader defines getSource function as: getSource(name: string): LoaderSource;
CasaTemplateLoader extends FileSystemLoader
However CasaTemplateLoadergetSource function is defined as: getSource(name: string): string;
Summary When using latest version of CASA with TypeScript, I get a compilation error.
CasaTemplateLoader``getSource
function has incompatible return type.FileSystemLoader
definesgetSource
function as:getSource(name: string): LoaderSource;
CasaTemplateLoader
extendsFileSystemLoader
HoweverCasaTemplateLoader
getSource
function is defined as:getSource(name: string): string;
Which causes TypeScript compilation errors:
Steps to reproduce I created a GitHub repo with the bug: https://github.com/WorkingTheo/BugDemo
To reproduce the bug:
npm i
npm run build
ornpx tsc
Current behaviour
When compiling TypeScript CASA (8.7.8) project, the above errors pop up Expected behaviour No errors should appear during compilation
Relevant logs and/or screenshots
Possible fixes Changing the return type of
getSource
toLoaderSource
. Before:After: