webpack/examples/source-mapping-url/node_modules/library/src/index.ts

10 lines
163 B
TypeScript

const greet = (name: string) => {
if (typeof name !== "string") {
throw new TypeError("Invalid name type");
}
return `Hello, ${name}!`;
};
export { greet }