Skip to main content

safeCast

function

Explicitly and safely cast a value to a specific type when inference or satisfies isn't going to work as expected (often useful for the config property with defineExtension)

function safeCast<T>(value: T): T

Import

import { safeCast } from '@modular/sdk/editor';

Notes

__NO_SIDE_EFFECTS__
lexical-inline
identity