Open HimanshuGoel opened 1 year ago
Looks like Jsep isn't included in TypeScript, but both of these work:
import * as jsep from 'jsep'
const { Jsep } = jsep
console.log(Jsep.parse('1 + 1'))
import { Jsep } from 'jsep'
console.log(Jsep.parse('1 + 1'))
If you look at the git log
, it looks like the types are manually built: https://github.com/EricSmekens/jsep/commits/master/typings/tsd.d.ts
I suggest just using the jsep()
API.
I don't have a use case for being able to use Jsep.parse
in TypeScript the but I might have a use case for #211. I don't know yet. I think a fix for #211 could make this one easier.
I am getting an error
Module '"jsep"' has no exported member 'Jsep'
while importing theJsep
library by using the below statement -I am using the
1.3.8
version ofJsep
library in a standard Angular 15 application.However, it works fine when I use the default import syntax -
I have also created a minimal reproduction example on Github. Please refer to this link to open it on Stackblitz - https://stackblitz.com/github/HimanshuGoel/issues-reproduction-app/tree/jsep-issue-with-import?file=src%2Fapp%2Fapp.component.ts