swc/crates/swc_bundler/tests/.cache/deno/841cf6700b49ed12a9eff2f50b70a1a2c1d45478.ts
2021-11-09 20:42:49 +09:00

11 lines
276 B
TypeScript

// Loaded from https://deno.land/x/segno@v1.1.0/lib/helpers/assertString.ts
export const assertString = (input: string) => {
const isString = typeof input === 'string';
if (!isString) {
throw new TypeError(`Expected a string but received ${typeof input}.`);
}
};