(id: Id)
| 84 | |
| 85 | /** @internal */ |
| 86 | export const Tag = <const Id extends string>(id: Id) => <Self, Shape>(): C.TagClass<Self, Id, Shape> => { |
| 87 | const limit = getStackTraceLimit() |
| 88 | setStackTraceLimit(2) |
| 89 | const creationError = new Error() |
| 90 | setStackTraceLimit(limit) |
| 91 | |
| 92 | function TagClass() {} |
| 93 | Object.setPrototypeOf(TagClass, TagProto) |
| 94 | TagClass.key = id |
| 95 | Object.defineProperty(TagClass, "stack", { |
| 96 | get() { |
| 97 | return creationError.stack |
| 98 | } |
| 99 | }) |
| 100 | return TagClass as any |
| 101 | } |
| 102 | |
| 103 | /** @internal */ |
| 104 | export const Reference = <Self>() => |
nothing calls this directly
no test coverage detected