ValueDescriptor.ts
17 lines
| 311 B
| video/mp2t
|
TypeScriptLexer
|
|
r49 | import { Descriptor } from "./interfaces"; | ||
|
|
r115 | export class ValueDescriptor<T> implements Descriptor<any, T> { | ||
|
|
r113 | _value: T; | ||
|
|
r49 | |||
|
|
r113 | constructor(value: T) { | ||
|
|
r49 | this._value = value; | ||
| } | ||||
| activate() { | ||||
| return this._value; | ||||
| } | ||||
| toString() { | ||||
| return `@type=${typeof this._value}`; | ||||
| } | ||||
| } | ||||
