@@ -23,22 +23,21 @@ function so(emphasis: null | TokiPona.Emphasis) {
23
23
}
24
24
}
25
25
}
26
- // TODO: is {type: "simple"} necessary here?
27
26
export function adjective (
28
27
options : Readonly < {
29
28
definition : Dictionary . Adjective ;
30
29
reduplicationCount : number ;
31
30
emphasis : null | TokiPona . Emphasis ;
32
31
} > ,
33
- ) : IterableResult < English . AdjectivePhrase & { type : "simple" } > {
32
+ ) : IterableResult < English . AdjectivePhrase > {
34
33
const { definition, reduplicationCount, emphasis } = options ;
35
34
type EmphasisSo = Readonly < { emphasis : boolean ; so : null | string } > ;
36
35
return IterableResult . concat (
37
36
IterableResult . from ( ( ) => IterableResult . single ( so ( emphasis ) ) )
38
37
. map ( ( so ) : EmphasisSo => ( { emphasis : false , so } ) ) ,
39
38
IterableResult . single < EmphasisSo > ( { emphasis : emphasis != null , so : null } ) ,
40
39
)
41
- . map ( ( { emphasis, so } ) : English . AdjectivePhrase & { type : "simple" } => ( {
40
+ . map ( ( { emphasis, so } ) : English . AdjectivePhrase => ( {
42
41
type : "simple" ,
43
42
kind : definition . kind ,
44
43
adverbs : [
@@ -60,14 +59,13 @@ export function adjective(
60
59
emphasis : false ,
61
60
} ) ) ;
62
61
}
63
- // TODO: is {type: "compound"} necessary here?
64
62
export function compoundAdjective (
65
63
options : Readonly < {
66
64
adjectives : ReadonlyArray < Dictionary . Adjective > ;
67
65
reduplicationCount : number ;
68
66
emphasis : null | TokiPona . Emphasis ;
69
67
} > ,
70
- ) : IterableResult < English . AdjectivePhrase & { type : "compound" } > {
68
+ ) : IterableResult < English . AdjectivePhrase > {
71
69
const { adjectives, reduplicationCount, emphasis } = options ;
72
70
if ( reduplicationCount === 1 ) {
73
71
return IterableResult . combine (
@@ -76,7 +74,7 @@ export function compoundAdjective(
76
74
adjective ( { definition, reduplicationCount : 1 , emphasis } )
77
75
) ,
78
76
)
79
- . map ( ( adjectives ) : English . AdjectivePhrase & { type : "compound" } => ( {
77
+ . map ( ( adjectives ) : English . AdjectivePhrase => ( {
80
78
type : "compound" ,
81
79
conjunction : "and" ,
82
80
adjectives,
0 commit comments