Skip to content
This repository was archived by the owner on Sep 9, 2021. It is now read-only.
This repository was archived by the owner on Sep 9, 2021. It is now read-only.

Document Interop with Typescript #69

@tomlagier

Description

@tomlagier

I'm not sure the best place for this, if it's a candidate for addition to the README. Currently it's buried in the awesome-typescript-loader issues, and I'd love to get some more visibility as I spent a chunk of time trying to get it functional. This is how you can make the worker-loader function with Typescript 2+

App.ts

import * as MyWorker from "worker-loader!../../worker";
const worker: Worker = new MyWorker();

typings/custom.d.ts

declare module "worker-loader!*" {
  const content: any;
  export = content;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions