mirror of https://github.com/webpack/webpack.git
10 lines
163 B
TypeScript
10 lines
163 B
TypeScript
|
const greet = (name: string) => {
|
||
|
if (typeof name !== "string") {
|
||
|
throw new TypeError("Invalid name type");
|
||
|
}
|
||
|
|
||
|
return `Hello, ${name}!`;
|
||
|
};
|
||
|
|
||
|
export { greet }
|