In-game tools · function

jumpToSourceCommand

Ask to look at a place in a file.

Explained in In-game tools.

function jumpToSourceCommand(cursor: SourceCursor, file: string, line: number): Command | null
import { jumpToSourceCommand } from '@driftengine/tools';

Parameters

ParameterTypeDescription
cursorSourceCursor
filestring
linenumber

In depth

A command, so going back is the same gesture as any other undo. Whether a caller puts it on the undo stack or merely applies it is the caller's decision — the console knows how to describe the jump and not what navigation should cost.