private-data-container-interface
v1.0.0
Published
a typescript interface with two methods: import() and export()
Downloads
4
Maintainers
Readme
This is a Typescript interface with two methods: import() and export()
The idea is to have any class that manipulates private data that you should eventually have access to (after the manipulations are complete) implement this interface. The only way to pass new data into the class would be with import(), and the only way to get it back would be with export().
To include in your project:
import { IPrivateDataContainer } from 'private-data-container-interface/IPrivateDataContainer';
Usage examples:
export class PrivateArrayContainer implements IPrivateDataContainer<any[]> {...}
export class PrivateStringContainer implements IPrivateDataContainer<string> {...}
import() must follow this implementation:
import(data: Type, ...args): any;
export must follow this implementation:
export(): Type;