车间能级提升-智能设备管理系统
zhuguifei
2025-05-26 9af9ab79236d68112bec7138ee7f1b2461d20f68
1
2
3
4
5
6
7
8
export type Awaitable<T> = Promise<T> | T;
 
export async function interopDefault<T>(
  m: Awaitable<T>,
): Promise<T extends { default: infer U } ? U : T> {
  const resolved = await m;
  return (resolved as any).default || resolved;
}