fix(packages): use ES modules for primary build (#11120)
This commit is contained in:

committed by
Victor Berchet

parent
8cb1046ce9
commit
979657989b
@ -17,7 +17,7 @@ export function normalizeMethodName(method: string | RequestMethod): RequestMeth
|
||||
.replace(
|
||||
/(\w)(\w*)/g,
|
||||
(g0: string, g1: string, g2: string) => g1.toUpperCase() + g2.toLowerCase());
|
||||
method = <number>(<{[key: string]: any}>RequestMethod)[method];
|
||||
method = <RequestMethod>(<{[key: string]: any}>RequestMethod)[method];
|
||||
if (typeof method !== 'number')
|
||||
throw new Error(`Invalid request method. The method "${originalMethod}" is not supported.`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user