fedyna-k / polypets

Super AR auto pets
GNU General Public License v3.0
1 stars 0 forks source link

Cache implementation #1

Closed fedyna-k closed 2 months ago

fedyna-k commented 2 months ago

Abstract

Changed file name to cache.ts, added all CRUD methods and added declaration file for types.

Declaration example

src/@types/cache.d.ts

// Declares a type in d.ts file.
declare type KeyValue = Record<string, string>;

src/handler/cache.ts

// Note that there is no need to import
// declaration file because it's in the @types folder
const kv: KeyValue = {};

CRUD

All restful DB operations defined by CRUD are implemented (but not tested for now) :