Skip to content

Promise.withResolvers is always polyfilled even when not desired #438

@char

Description

@char

In our use case we are supplying our own polyfill for everything already so we set target to "Latest" to avoid dnt polyfills -- but since Promise.withResolvers is hardcoded to always polyfill, it's breaking our dnt generation runs:

src/_dnt.polyfills.ts:1:9 - error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.

1 declare global {
          ~~~~~~

error: Uncaught (in promise) Error: Had 1 diagnostics.
          throw new Error(`Had ${diagnostics.length} diagnostics.`);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions