ts-type-info icon indicating copy to clipboard operation
ts-type-info copied to clipboard

Cache info result

Open BzenkoSergey opened this issue 9 years ago • 1 comments

What about data caching?

example:

let result = tsTypeInfo.getInfoFromFiles([filePath], {});

// get json scheme
let resultJson = result.toJSON();

// cache the scheme
someStorage.set('tsTypeInfoData', resultJson);

// next use
let resultJson = someStorage.get('tsTypeInfoData');
let result = tsTypeInfo.getInfoFromJsonScheme(resultJson);

BzenkoSergey avatar Sep 19 '16 15:09 BzenkoSergey

I've been wondering about this. I'll look into it. I believe I will be able to generate the code for this using this: https://github.com/dsherret/ts-object-create (but it will probably need an improvement)

dsherret avatar Sep 23 '16 01:09 dsherret