The TypeScript SDK example has been written for the The right way to build a TypeScript SDK blog.
npm install ts-sdk-example
You can use the addGreetToMsg function to get a function that you can call to add that particular greeting to every message, you call that function with.
import { addGreetToMsg } from "ts-sdk-example";
const greetHello = addGreetToMsg("Hello! ");
const message = "TS SDK";
const greetMsg = greetHello(message);
console.log(greetMsg);
// Hello! TS SDK
See the function code here to check its implementation.
TypeDocs - here