UNPKG

@lobehub/editor

Version:

A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.

17 lines (16 loc) 638 B
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ // invariant(condition, message) will refine types based on "condition", and // if "condition" is false will throw an error. This function is special-cased // in flow itself, so we can't name it anything else. export default function invariant(cond, message) { if (cond) { return; } throw new Error('Internal Lexical error: invariant() is meant to be replaced at compile ' + 'time. There is no runtime version. Error: ' + message); }