MCPcopy Index your code
hub / github.com/microsoft/typescript-go / newLineCharacterCache

Function newLineCharacterCache

internal/printer/utilities.go:912–917  ·  view source on GitHub ↗
(source sourcemap.Source)

Source from the content-addressed store, hash-verified

910}
911
912func newLineCharacterCache(source sourcemap.Source) *lineCharacterCache {
913 return &lineCharacterCache{
914 lineMap: source.ECMALineMap(),
915 text: source.Text(),
916 }
917}
918
919// getLineAndCharacter returns the 0-based line number and UTF-16 code unit
920// offset from the start of that line for the given byte position.

Callers 1

setSourceMapSourceMethod · 0.85

Calls 2

ECMALineMapMethod · 0.65
TextMethod · 0.65

Tested by

no test coverage detected