UNPKG
tsgen2
Version:
latest (1.0.4)
1.0.4
1.0.2
1.0.1
1.0.0
Generates Typescript code programatically
github.com/jmulet/tsgen
jmulet/tsgen
tsgen2
/
src
/
TsGenTreeUtil.ts
17 lines
(13 loc)
•
323 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import
{
Treeable
}
from
"./TsGenUtil"
;
class
TreeUtil
implements
Treeable
{
value
:
any
;
private
constructor
(
value
:
any
) {
this
.
value
= value }
static
fromString
(
str
:
string
) {
return
new
TreeUtil
(str); }
toArrayTree
():
Array
<
string
> {
return
[
this
.
value
]; } }