Skip to content

Motivation for inferring that a given worker is a module worker #7

@codehag

Description

@codehag

This is a minor thing, but one section of the readme points out that {type: module} will be inferred:

import source myModule from "./my-module.js";

// `{ type: 'module' }` can be inferred since myModule is a module object
const worker = new Worker(myModule);

This seems bad for readability and adds additional overhead to the act of reading. It reduces typing time, but reading time is more significant. I lean towards keeping this explicit. Do we have other reasons why this would be inferred?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions