File size: 296 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
/**
* An auto-incrementing identifier for keys.
*/
let n = 0
/**
* A class that keeps track of a key string. We use a full class here because we
* want to be able to use them as keys in `WeakMap` objects.
*/
export class Key {
id: string
constructor() {
this.id = `${n++}`
}
}
|