NodeCache already has Typescript support, however, you always need to pass your type when using cache.get() for example.
Below you can find an example of a cache factory which provides a full typesafe interface while only providing the type once.
How it works? The type interface for the NodeCache already has dynamic types and I only wrapped it in a wrapper-function and enhanced the JSDoc comments.