mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-17 14:30:32 +02:00
feat: render frames on export (#7210)
This commit is contained in:
11
src/utils.ts
11
src/utils.ts
@@ -834,11 +834,18 @@ export const isOnlyExportingSingleFrame = (
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* supply `null` as message if non-never value is valid, you just need to
|
||||
* typecheck against it
|
||||
*/
|
||||
export const assertNever = (
|
||||
value: never,
|
||||
message: string,
|
||||
message: string | null,
|
||||
softAssert?: boolean,
|
||||
): never => {
|
||||
if (!message) {
|
||||
return value;
|
||||
}
|
||||
if (softAssert) {
|
||||
console.error(message);
|
||||
return value;
|
||||
@@ -931,3 +938,5 @@ export const isMemberOf = <T extends string>(
|
||||
? collection.includes(value as T)
|
||||
: collection.hasOwnProperty(value);
|
||||
};
|
||||
|
||||
export const cloneJSON = <T>(obj: T): T => JSON.parse(JSON.stringify(obj));
|
||||
|
Reference in New Issue
Block a user