UNPKG

1.02 kBSource Map (JSON)View Raw
1{"version":3,"file":"offers.js","sourceRoot":"","sources":["../../../src/utils/offers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,UAAU,aAAa,CAAC,IAAsB;IAClD,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;SACrE;QACD,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,+EAA+E,CAChF,CAAC;SACH;KACF;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ContainerRequest } from \"../client/Container/ContainerRequest\";\n\nexport function validateOffer(body: ContainerRequest): void {\n if (body.throughput) {\n if (body.maxThroughput) {\n console.log(\"should be erroring\");\n throw new Error(\"Cannot specify `throughput` with `maxThroughput`\");\n }\n if (body.autoUpgradePolicy) {\n throw new Error(\n \"Cannot specify autoUpgradePolicy with throughput. Use `maxThroughput` instead\"\n );\n }\n }\n}\n"]}
\No newline at end of file