Using functions inside a typescript class - “TypeError: is not a function”
'm trying to setup comlink in a typescript project but can't work out why this doesn't work.
My calling method/ class
import Mehs from "@/myTest.worker";
export default class TestCalling{``
public async callMyTestMethod(): Promise
export default class TestWorker{
public async greet(subject: string): PromiseHello, ${subject}!);
});
}
}
This give me the following error : "TypeError: meh.greet is not a function"
However if i just export a function it works i.e.
export async function greet(subject: string): PromiseHello, ${subject}!);
});
}
But i want to use a class as it may have multiple functions that i want to call. What am i doing wrong ?