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
I have a file that imports a bunch of classes and Id like to reexport them from there as properties something like
/** Class representing a point. */classPoint{/** * Create a point. * @param {number} x - The x value. * @param {number} y - The y value. */constructor(x,y){// ...}/** * Get the x value. * @return {number} The x value. */getX(){// ...}}
but my types.d.ts makes the Point export a var and I get the complaint that it can't be new since its not a function or constrcutor
/** * Create a point. * @param x - The x value. * @param y - The y value. */declareclassPoint{constructor(x: number,y: number);/** * Get the x value. * @returns The x value. */getX(): number;}/** * App Module */declare module "app"{varPoint: Point;}
is it possible to add Point as an export to app so I can call new app.Point(x,y) ?
The text was updated successfully, but these errors were encountered:
I have a file that imports a bunch of classes and Id like to reexport them from there as properties something like
but my types.d.ts makes the
Point
export a var and I get the complaint that it can't benew
since its not a function or constrcutoris it possible to add
Point
as an export to app so I can callnew app.Point(x,y)
?The text was updated successfully, but these errors were encountered: