From 0cbf9c2d7de6772fc5b71d241d2b8636c034bc73 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 23 Feb 2020 02:31:09 -0500 Subject: [PATCH] Delete experimental Form2 that was adopted. --- src/Form.test.ts | 55 ------------------------------------------------ 1 file changed, 55 deletions(-) diff --git a/src/Form.test.ts b/src/Form.test.ts index c61ad58..309c302 100644 --- a/src/Form.test.ts +++ b/src/Form.test.ts @@ -82,58 +82,3 @@ test('form types', () => { expect(isFormT(new FormA(), FormB)).toBe(false); expect(isFormT(new FormB(), FormB)).toBe(true); }); - -/* -abstract class Form2 } , I> { - abstract readonly name: string; - - protected abstract readonly _lines: L; - protected abstract readonly _input?: I; - - getLine(key: K): L[K] { - return this._lines[key]; - } - - getInput(key: K): I[K] { - return this._input[key]; - } - - getValue(tr: TaxReturn, key: K): T { - const line = this.getLine(key); - return line.value(tr); - } -}; - -class FormG extends Form2 { - readonly name = 'G'; - - protected readonly _lines = { - x: new ComputedLine('moo', () => 42), - z: new ComputedLine('moo', () => 36), - }; - protected readonly _input = null; - - private _moo = 42; - - getLineImpl(lines: T, k: K): T[K] { - return lines[k]; - } - - allLines(): FormG['_lines'] { - return this._lines; - } - - LINE = k => this.getLineImpl(this._lines, k); - - testLine>(k: K): any { - return this.getLineImpl(this._lines, k); - } -} - -test('testing', () => { - const g = new FormG(); - let v = g.testLine('x'); //g.getLineImpl(g._lines, 'x'); - let v2 = g.getValue(null, 'z'); - throw new Error(`v = ${v2}`); -}); -*/ -- 2.43.5