Merge remote-tracking branch 'origin/master' into aakansha-custom-elements

This commit is contained in:
ad1992 2022-04-21 19:50:46 +05:30
commit 4953828d86
126 changed files with 4379 additions and 1606 deletions

View file

@ -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
);
};