nylas/nylas-nodejs

`This expression is not constructable.` with beta client in Deno

Closed this issue · 1 comments

Describe the bug
Curernt beta SDK with TypeScript 5.2.2 under Deno (tho it should be the same with Node?..) gives This expression is not constructable.

To Reproduce

import Nylas from 'npm:nylas@7.0.0-beta.3'

const nylas = new Nylas({apiKey: Deno.env.get('NYLAS_API_KEY')!})

image

Expected behavior
No error.

SDK Version:
7.0.0-beta.3

Additional context
This weird way seems to work:

import {default as Nylas} from 'npm:nylas@7.0.0-beta.3'

const nylas = new Nylas.default({apiKey: Deno.env.get('NYLAS_API_KEY')!})

Oops it seems to be only an IDE error problem, not runtime problem. Normal version actually works and "default"
one doesn't.