@openapi-generator-plus/typescript-fetch-rn-client-generator
Version:
An OpenAPI Generator Plus template for a TypeScript API client using Fetch in React Native
16 lines (15 loc) • 483 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hooks = void 0;
const template_utils_1 = require("@openapi-generator-plus/template-utils");
/**
* Hook overrides for fetch-rn-client: add the `abab` `btoa` polyfill that
* React Native's JS engine doesn't provide natively.
*/
exports.hooks = {
apiImports: () => (0, template_utils_1.ts) `
import { btoa } from "abab";`,
packageDependencies: () => [
'"abab": "^2.0.5"',
],
};