sourcemap should be an array · Issue #1549 · TypeScriptToLua/TypeScriptToLua · GitHub
Skip to content

sourcemap should be an array #1549

Open

Description

@jake-stewart

for example,

{["15"] = 7,["16"] = 9,["17"] = 9,["18"] = 9,["19"] = 9,["21"] = 10,["24"] = 9,["25"] = 9,["26"] = 13,["27"] = 13,["28"] = 13,["29"] = 13,["30"] = 14,["31"] = 13,["32"] = 13})

can be written as

{0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,9,9,9,9,9,10,10,10,9,9,13,13,13,13,14,13,13,13}

zero indexed, so just -1 when finding the line. if line is nil or 0, then it is not found.

EDIT: possibly it is a concern that the source starts very late (in the case of a bundle). could have an offset to remove the need for leading zeroes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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