mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 05:32:09 +03:00
11 lines
276 B
TypeScript
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}.`);
|
|
}
|
|
};
|