mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Merge remote-tracking branch 'origin/master' into aakansha-custom-elements
This commit is contained in:
commit
4953828d86
126 changed files with 4379 additions and 1606 deletions
12
src/utils.ts
12
src/utils.ts
|
@ -635,3 +635,15 @@ export const getCustomElementConfig = (
|
|||
}
|
||||
return customElementConfig.find((config) => config.customType === customType);
|
||||
};
|
||||
|
||||
export const isPromiseLike = (
|
||||
value: any,
|
||||
): value is Promise<ResolutionType<typeof value>> => {
|
||||
return (
|
||||
!!value &&
|
||||
typeof value === "object" &&
|
||||
"then" in value &&
|
||||
"catch" in value &&
|
||||
"finally" in value
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue