mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: render frames on export (#7210)
This commit is contained in:
parent
a9a6f8eafb
commit
864c0b3ea8
30 changed files with 989 additions and 332 deletions
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue