You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importAPIfrom'apifn';// TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.exportdefaultnewAPI('https://google.com',[]);
Both allowSyntheticDefaultImports and esModuleInterop are set to true here.
I can't understand how those syntaxes are different, as I believe the default import syntax is part of the TC39 standard already or isn't it? Asking because this works perfectly with Babel. Only when I'm with projects with TypeScript that this confusion with default starts to happen.
The apifn package is a small package developed by myself. It uses TypeScript for generating ES5+Common JS.
Related Issues:#21621 (I originally posted there, but it was informed that they aren't related)
The text was updated successfully, but these errors were encountered:
Hello, look at the following please:
This results in a compile error:
This works:
Both
allowSyntheticDefaultImports
andesModuleInterop
are set to true here.I can't understand how those syntaxes are different, as I believe the default import syntax is part of the TC39 standard already or isn't it? Asking because this works perfectly with Babel. Only when I'm with projects with TypeScript that this confusion with
default
starts to happen.The
apifn
package is a small package developed by myself. It uses TypeScript for generating ES5+Common JS.Related Issues: #21621 (I originally posted there, but it was informed that they aren't related)
The text was updated successfully, but these errors were encountered: