Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated mappings are not assignable to trace-mapping AnyMap #21

Closed
connor4312 opened this issue Oct 4, 2022 · 1 comment · Fixed by #20
Closed

Generated mappings are not assignable to trace-mapping AnyMap #21

connor4312 opened this issue Oct 4, 2022 · 1 comment · Fixed by #20

Comments

@connor4312
Copy link
Contributor

Trying to invoke new AnyMap(toDecodedMap(sourceMap)) gives the error:

Argument of type 'DecodedSourceMap' is not assignable to parameter of type 'SectionedSourceMapInput'.
  Type 'import("/Users/connor/Github/vscode-js-debug/node_modules/@jridgewell/gen-mapping/dist/types/types").DecodedSourceMap' is not assignable to type 'import("/Users/connor/Github/vscode-js-debug/node_modules/@jridgewell/trace-mapping/dist/types/types").DecodedSourceMap'.
    Types of property 'mappings' are incompatible.
      The type 'readonly SourceMapSegment[][]' is 'readonly' and cannot be assigned to the mutable type 'SourceMapSegment[][]'.

and try to invoke new AnyMap(toEncodedMap(sourceMap)) seems to fail to match the right union and just gives:

Argument of type 'EncodedSourceMap' is not assignable to parameter of type 'SectionedSourceMapInput'.
  Type 'EncodedSourceMap' is not assignable to type 'DecodedSourceMap'.
    Types of property 'mappings' are incompatible.
      Type 'string' is not assignable to type 'SourceMapSegment[][]'.
@jridgewell
Copy link
Owner

#20 should solve this.

@jridgewell jridgewell transferred this issue from jridgewell/gen-mapping Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants