Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

SourceMap type export #189

@privatenumber

Description

@privatenumber

Would like to request that the return type of remapping (SourceMap) be exported. It would be useful when typing functions that expect the returned map.

Currently, it doesn't seem to be exported: https://unpkg.com/@ampproject/[email protected]/dist/types/remapping.d.ts

As a side, I wanted to mention a discrepancy between the documentation and code. The documentation says the input SourceMap and the return SourceMap are the same. However, when trying it out, they seem to be different.

From the docs:

function remapping(
  map: SourceMap | SourceMap[],
  loader: (file: string, ctx: LoaderContext) => (SourceMap | null | undefined),
  options?: { excludeContent: boolean, decodedMappings: boolean }
): SourceMap;

From the code:

function remapping(
  input: SourceMapInput | SourceMapInput[],
  loader: SourceMapLoader,
  options?: boolean | Options
): SourceMap;

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