Skip to content

getCallerLocation() function

Home > @rimitive/core > getCallerLocation

Parse a stack trace to extract the caller’s source location.

Returns a short, readable location like “TodoList.ts:23” or “service.ts:15”. Skips internal frames (node_modules, rimitive internals) to find the user’s code.

Signature:

export declare function getCallerLocation(skipFrames?: number): string | undefined;

Parameter

Type

Description

skipFrames

number

(Optional)

Returns:

string | undefined