The framework(nestjs) I am using is still with "module": "commonjs" and I used to import like this:
import * as handlebars from '@jaredwray/fumanchu';
handlebars.compile(receiptSubjectFile);
Everything works fine in 1.3.0
But in 1.4.0, typescript will complain the line:
handlebars.compile(receiptSubjectFile);
it can run correctly at runtime but the typescript syntax check will say "Property compile does not exist on type..."
If I import like this:
import handlebars from '@jaredwray/fumanchu';
handlebars.compile(receiptSubjectFile);
handlebars.compile will fail in runtime as handlebars is undefined
If I import like this:
const handlebars = require('@jaredwray/fumanchu');
handlebars.compile(receiptSubjectFile);
The framework(nestjs) I am using is still with "module": "commonjs" and I used to import like this: import * as handlebars from '@jaredwray/fumanchu'; handlebars.compile(receiptSubjectFile);
Everything works fine in 1.3.0
But in 1.4.0, typescript will complain the line: handlebars.compile(receiptSubjectFile);
it can run correctly at runtime but the typescript syntax check will say "Property compile does not exist on type..."
If I import like this: import handlebars from '@jaredwray/fumanchu'; handlebars.compile(receiptSubjectFile);
handlebars.compile will fail in runtime as handlebars is undefined
If I import like this: const handlebars = require('@jaredwray/fumanchu'); handlebars.compile(receiptSubjectFile);
it works on runtime and lint