Corrected the sample in the TypeScript Docs

Corrected the sample in the TypeScript Docs