Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (20 sloc) 480 Bytes
import {Converter} from "../decorators/converter";
import {IConverter} from "../interfaces/index";
/**
* Converter component for the `Symbol` Type.
* @private
* @converters
* @component
*/
@Converter(Symbol)
export class SymbolConverter implements IConverter {
deserialize(data: string, target: any): symbol {
return Symbol(data);
}
serialize(object: Symbol): any {
return object
.toString()
.replace("Symbol(", "")
.replace(")", "");
}
}
You can’t perform that action at this time.