immutable-js
Version:
Immutable types in JavaScript
30 lines (23 loc) • 697 B
JavaScript
/**
* Copyright (c) 2015, Jan Biasi.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import uniqueID from './util/guid';
import { typedef as defineTypeOf } from './util/toolset';
export var OWNER_TYPEDEF = '[OwnerID]';
export class OwnerID {
constructor() {
this.__key__ = uniqueID();
}
toString() {
return '[OwnerID ' + this.__toString() + ']';
}
__toString() {
return this.__key__;
}
}
defineTypeOf(OwnerID, OWNER_TYPEDEF);