|
1 | 1 | import { AnyNode, Inheritable } from "./Inheritable";
|
2 |
| -export { Ruleset } from "./RulesetContainer"; |
3 | 2 | import { Style } from "./Style";
|
4 | 3 |
|
5 |
| -export { Style, isStyle } from "./Style"; |
6 |
| - |
7 | 4 | // Its days like these that I wish JavaScript had multiple inheritance.
|
8 |
| -export abstract class Source< |
9 |
| - Self extends Source<Self, Child>, |
| 5 | +export abstract class SourceNode< |
| 6 | + Self extends SourceNode<Self, Child>, |
10 | 7 | Child extends Inheritable<Child, Self, Self, AnyNode>
|
11 | 8 | > extends Inheritable<Self, Self, null, Child> {
|
12 |
| - constructor(name: string) { |
13 |
| - super(name, null); |
14 |
| - } |
| 9 | + constructor(name: string) { super(name, null); } |
15 | 10 | }
|
16 | 11 |
|
17 | 12 | export abstract class Node<
|
18 | 13 | Self extends Node<Self, Root, Parent, Child>,
|
19 |
| - Root extends Source<Root, AnyNode>, |
| 14 | + Root extends SourceNode<Root, AnyNode>, |
20 | 15 | Parent extends Inheritable<Parent, Root, AnyNode, Self>,
|
21 | 16 | Child extends Inheritable<Child, Root, Self, AnyNode | null>
|
22 | 17 | > extends Inheritable<Self, Root, Parent, Child> {
|
23 | 18 | constructor(name: string, parent: Parent, root: Root) { super(name, parent, root); }
|
24 | 19 | }
|
25 | 20 |
|
26 |
| -export abstract class Sink< |
| 21 | +export abstract class SinkNode< |
27 | 22 | Self extends Inheritable<Self, Root, Parent, null>,
|
28 |
| - Root extends Source<Root, AnyNode>, |
| 23 | + Root extends SourceNode<Root, AnyNode>, |
29 | 24 | Parent extends Inheritable<Parent, Root, AnyNode, Self>
|
30 | 25 | > extends Inheritable<Self, Root, Parent, null> {
|
31 | 26 | constructor(name: string, parent: Parent, root: Root) { super(name, parent, root); }
|
32 | 27 | }
|
33 | 28 |
|
34 |
| -export abstract class NodeStyle< |
| 29 | +export abstract class StyleSource< |
| 30 | + Self extends StyleSource<Self, Child>, |
| 31 | + Child extends Inheritable<Child, Self, Self, AnyNode> |
| 32 | +> extends Inheritable<Self, Self, null, Child> { |
| 33 | + constructor(name: string) { super(name, null); } |
| 34 | +} |
| 35 | + |
| 36 | +export abstract class StyleNode< |
35 | 37 | Self extends Style<Self, Root, Parent, Child>,
|
36 |
| - Root extends Source<Root, AnyNode>, |
| 38 | + Root extends SourceNode<Root, AnyNode>, |
37 | 39 | Parent extends Inheritable<Parent, Root, AnyNode | null, Self>,
|
38 | 40 | Child extends Inheritable<Child, Root, Self, AnyNode | null>
|
39 | 41 | > extends Style<Self, Root, Parent, Child> {
|
40 | 42 | constructor(name: string, parent: Parent, root: Root) { super(name, parent, root); }
|
41 | 43 | }
|
42 | 44 |
|
43 |
| -export abstract class SinkStyle< |
| 45 | +export abstract class StyleSink< |
44 | 46 | Self extends Style<Self, Root, Parent, null>,
|
45 |
| - Root extends Source<Root, AnyNode>, |
| 47 | + Root extends SourceNode<Root, AnyNode>, |
46 | 48 | Parent extends Inheritable<Parent, Root, AnyNode, Self>
|
47 | 49 | > extends Style<Self, Root, Parent, null> {
|
48 | 50 | constructor(name: string, parent: Parent, root: Root) { super(name, parent, root); }
|
|
0 commit comments