fix(packages): use ES modules for primary build (#11120)

This commit is contained in:
Miško Hevery
2016-08-30 18:07:40 -07:00
committed by Victor Berchet
parent 8cb1046ce9
commit 979657989b
249 changed files with 1929 additions and 1463 deletions

View File

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