File tree 28 files changed +32
-82
lines changed
28 files changed +32
-82
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,8 @@ export type HorribleRecursiveTypeThatShouldNotBeUsedByAnyone<
99
99
> ;
100
100
} [ T [ "length" ] extends 0 ? 0 : 1 ] ;
101
101
102
- export type DoubleKey < T > = { [ K in keyof T & string as `${K } ${K } `] : T [ K ] }
102
+ export type DoubleKey < T > = { [ K in keyof T & string as `${K } ${K } `] : T [ K ] } ;
103
103
104
104
export function doubleKey < T > ( arg : T ) {
105
- return { } as { [ K in keyof T & string as `${K } ${K } `] : T [ K ] }
105
+ return { } as { [ K in keyof T & string as `${K } ${K } `] : T [ K ] } ;
106
106
}
Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ export class Serializer extends EventDispatcher {
118
118
}
119
119
}
120
120
121
- const serializerComponents : ( new ( owner : Serializer ) => SerializerComponent <
122
- any
123
- > ) [ ] = [
121
+ const serializerComponents : ( new (
122
+ owner : Serializer
123
+ ) => SerializerComponent < any > ) [ ] = [
124
124
S . CommentTagSerializer ,
125
125
S . CommentSerializer ,
126
126
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import { SerializerComponent } from "../components";
2
2
import { DecoratorWrapper } from "./models/decorator-wrapper" ;
3
3
import { Decorator } from "../schema" ;
4
4
5
- export class DecoratorContainerSerializer extends SerializerComponent <
6
- DecoratorWrapper
7
- > {
5
+ export class DecoratorContainerSerializer extends SerializerComponent < DecoratorWrapper > {
8
6
static PRIORITY = 1000 ;
9
7
10
8
/**
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { ReflectionCategory } from "../../models/ReflectionCategory";
3
3
import { SerializerComponent } from "../components" ;
4
4
import { ReflectionCategory as JSONReflectionCategory } from "../schema" ;
5
5
6
- export class ReflectionCategorySerializer extends SerializerComponent <
7
- ReflectionCategory
8
- > {
6
+ export class ReflectionCategorySerializer extends SerializerComponent < ReflectionCategory > {
9
7
static PRIORITY = 1000 ;
10
8
11
9
/**
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { ReflectionGroup } from "../../models/ReflectionGroup";
3
3
import { SerializerComponent } from "../components" ;
4
4
import { ReflectionGroup as JSONReflectionGroup } from "../schema" ;
5
5
6
- export class ReflectionGroupSerializer extends SerializerComponent <
7
- ReflectionGroup
8
- > {
6
+ export class ReflectionGroupSerializer extends SerializerComponent < ReflectionGroup > {
9
7
static PRIORITY = 1000 ;
10
8
11
9
/**
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ import { ReflectionSerializerComponent } from "../../components";
4
4
import { DecoratorWrapper } from "../models" ;
5
5
import type { Reflection as JSONReflection } from "../../schema" ;
6
6
7
- export class ReflectionSerializer extends ReflectionSerializerComponent <
8
- Reflection
9
- > {
7
+ export class ReflectionSerializer extends ReflectionSerializerComponent < Reflection > {
10
8
static PRIORITY = 1000 ;
11
9
12
10
supports ( t : unknown ) {
Original file line number Diff line number Diff line change 7
7
Reflection as JSONReflection ,
8
8
} from "../../schema" ;
9
9
10
- export class ContainerReflectionSerializer extends ReflectionSerializerComponent <
11
- ContainerReflection
12
- > {
10
+ export class ContainerReflectionSerializer extends ReflectionSerializerComponent < ContainerReflection > {
13
11
supports ( t : unknown ) {
14
12
return t instanceof ContainerReflection ;
15
13
}
Original file line number Diff line number Diff line change 7
7
ContainerReflection as JSONContainerReflection ,
8
8
} from "../../schema" ;
9
9
10
- export class DeclarationReflectionSerializer extends ReflectionSerializerComponent <
11
- DeclarationReflection
12
- > {
10
+ export class DeclarationReflectionSerializer extends ReflectionSerializerComponent < DeclarationReflection > {
13
11
static PRIORITY = ContainerReflectionSerializer . PRIORITY - 1 ; // mimic inheritance, run after parent
14
12
15
13
supports ( t : unknown ) {
Original file line number Diff line number Diff line change 6
6
Reflection as JSONReflection ,
7
7
} from "../../schema" ;
8
8
9
- export class ParameterReflectionSerializer extends ReflectionSerializerComponent <
10
- ParameterReflection
11
- > {
9
+ export class ParameterReflectionSerializer extends ReflectionSerializerComponent < ParameterReflection > {
12
10
supports ( t : unknown ) {
13
11
return t instanceof ParameterReflection ;
14
12
}
Original file line number Diff line number Diff line change 6
6
} from "../../schema" ;
7
7
import { DeclarationReflectionSerializer } from "./declaration" ;
8
8
9
- export class ReferenceReflectionSerializer extends ReflectionSerializerComponent <
10
- ReferenceReflection
11
- > {
9
+ export class ReferenceReflectionSerializer extends ReflectionSerializerComponent < ReferenceReflection > {
12
10
static PRIORITY = DeclarationReflectionSerializer . PRIORITY - 1 ;
13
11
14
12
supports ( t : unknown ) {
Original file line number Diff line number Diff line change 6
6
Reflection as JSONReflection ,
7
7
} from "../../schema" ;
8
8
9
- export class SignatureReflectionSerializer extends ReflectionSerializerComponent <
10
- SignatureReflection
11
- > {
9
+ export class SignatureReflectionSerializer extends ReflectionSerializerComponent < SignatureReflection > {
12
10
supports ( t : unknown ) {
13
11
return t instanceof SignatureReflection ;
14
12
}
Original file line number Diff line number Diff line change 6
6
Reflection as JSONReflection ,
7
7
} from "../../schema" ;
8
8
9
- export class TypeParameterReflectionSerializer extends ReflectionSerializerComponent <
10
- TypeParameterReflection
11
- > {
9
+ export class TypeParameterReflectionSerializer extends ReflectionSerializerComponent < TypeParameterReflection > {
12
10
supports ( t : unknown ) {
13
11
return t instanceof TypeParameterReflection ;
14
12
}
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import { SerializerComponent } from "../../components";
2
2
import { SourceReferenceWrapper } from "../models" ;
3
3
import { SourceReference as JSONSourceReference } from "../../schema" ;
4
4
5
- export class SourceReferenceContainerSerializer extends SerializerComponent <
6
- SourceReferenceWrapper
7
- > {
5
+ export class SourceReferenceContainerSerializer extends SerializerComponent < SourceReferenceWrapper > {
8
6
static PRIORITY = 1000 ;
9
7
10
8
serializeGroup ( instance : unknown ) {
Original file line number Diff line number Diff line change 5
5
ConditionalType as JSONConditionalType ,
6
6
} from "../../schema" ;
7
7
8
- export class ConditionalTypeSerializer extends TypeSerializerComponent <
9
- ConditionalType
10
- > {
8
+ export class ConditionalTypeSerializer extends TypeSerializerComponent < ConditionalType > {
11
9
supports ( item : unknown ) : boolean {
12
10
return item instanceof ConditionalType ;
13
11
}
Original file line number Diff line number Diff line change 5
5
IndexedAccessType as JSONIndexedAccessType ,
6
6
} from "../../schema" ;
7
7
8
- export class IndexedAccessTypeSerializer extends TypeSerializerComponent <
9
- IndexedAccessType
10
- > {
8
+ export class IndexedAccessTypeSerializer extends TypeSerializerComponent < IndexedAccessType > {
11
9
supports ( item : unknown ) : boolean {
12
10
return item instanceof IndexedAccessType ;
13
11
}
Original file line number Diff line number Diff line change 6
6
InferredType as JSONInferredType ,
7
7
} from "../../schema" ;
8
8
9
- export class InferredTypeSerializer extends TypeSerializerComponent <
10
- InferredType
11
- > {
9
+ export class InferredTypeSerializer extends TypeSerializerComponent < InferredType > {
12
10
supports ( item : unknown ) : boolean {
13
11
return item instanceof InferredType ;
14
12
}
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { IntersectionType } from "../../../models";
3
3
import { TypeSerializerComponent } from "../../components" ;
4
4
import { IntersectionType as JSONIntersectionType } from "../../schema" ;
5
5
6
- export class IntersectionTypeSerializer extends TypeSerializerComponent <
7
- IntersectionType
8
- > {
6
+ export class IntersectionTypeSerializer extends TypeSerializerComponent < IntersectionType > {
9
7
supports ( t : unknown ) {
10
8
return t instanceof IntersectionType ;
11
9
}
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { IntrinsicType } from "../../../models";
3
3
import { TypeSerializerComponent } from "../../components" ;
4
4
import { IntrinsicType as JSONIntrinsicType } from "../../schema" ;
5
5
6
- export class IntrinsicTypeSerializer extends TypeSerializerComponent <
7
- IntrinsicType
8
- > {
6
+ export class IntrinsicTypeSerializer extends TypeSerializerComponent < IntrinsicType > {
9
7
supports ( t : unknown ) {
10
8
return t instanceof IntrinsicType ;
11
9
}
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { LiteralType } from "../../../models";
3
3
import { TypeSerializerComponent } from "../../components" ;
4
4
import { LiteralType as JSONLiteralType } from "../../schema" ;
5
5
6
- export class LiteralTypeSerializer extends TypeSerializerComponent <
7
- LiteralType
8
- > {
6
+ export class LiteralTypeSerializer extends TypeSerializerComponent < LiteralType > {
9
7
supports ( t : unknown ) {
10
8
return t instanceof LiteralType ;
11
9
}
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import { PredicateType } from "../../../models";
2
2
import { TypeSerializerComponent } from "../../components" ;
3
3
import { PredicateType as JSONPredicateType } from "../../schema" ;
4
4
5
- export class PredicateTypeSerializer extends TypeSerializerComponent <
6
- PredicateType
7
- > {
5
+ export class PredicateTypeSerializer extends TypeSerializerComponent < PredicateType > {
8
6
supports ( t : unknown ) {
9
7
return t instanceof PredicateType ;
10
8
}
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { ReferenceType } from "../../../models";
3
3
import { TypeSerializerComponent } from "../../components" ;
4
4
import { ReferenceType as JSONReferenceType } from "../../schema" ;
5
5
6
- export class ReferenceTypeSerializer extends TypeSerializerComponent <
7
- ReferenceType
8
- > {
6
+ export class ReferenceTypeSerializer extends TypeSerializerComponent < ReferenceType > {
9
7
supports ( t : unknown ) {
10
8
return t instanceof ReferenceType ;
11
9
}
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { ReflectionType } from "../../../models";
3
3
import { TypeSerializerComponent } from "../../components" ;
4
4
import { ReflectionType as JSONReflectionType } from "../../schema" ;
5
5
6
- export class ReflectionTypeSerializer extends TypeSerializerComponent <
7
- ReflectionType
8
- > {
6
+ export class ReflectionTypeSerializer extends TypeSerializerComponent < ReflectionType > {
9
7
supports ( t : unknown ) {
10
8
return t instanceof ReflectionType ;
11
9
}
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import { TemplateLiteralType } from "../../../models";
2
2
import { TypeSerializerComponent } from "../../components" ;
3
3
import { TemplateLiteralType as JSONTemplateLiteralType } from "../../schema" ;
4
4
5
- export class TemplateLiteralTypeSerializer extends TypeSerializerComponent <
6
- TemplateLiteralType
7
- > {
5
+ export class TemplateLiteralTypeSerializer extends TypeSerializerComponent < TemplateLiteralType > {
8
6
supports ( t : unknown ) {
9
7
return t instanceof TemplateLiteralType ;
10
8
}
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ export class TupleTypeSerializer extends TypeSerializerComponent<TupleType> {
26
26
}
27
27
}
28
28
29
- export class NamedTupleMemberTypeSerializer extends TypeSerializerComponent <
30
- NamedTupleMember
31
- > {
29
+ export class NamedTupleMemberTypeSerializer extends TypeSerializerComponent < NamedTupleMember > {
32
30
supports ( t : unknown ) {
33
31
return t instanceof NamedTupleMember ;
34
32
}
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { TypeOperatorType } from "../../../models";
3
3
import { TypeSerializerComponent } from "../../components" ;
4
4
import { TypeOperatorType as JSONTypeOperatorType } from "../../schema" ;
5
5
6
- export class TypeOperatorTypeSerializer extends TypeSerializerComponent <
7
- TypeOperatorType
8
- > {
6
+ export class TypeOperatorTypeSerializer extends TypeSerializerComponent < TypeOperatorType > {
9
7
supports ( t : unknown ) {
10
8
return t instanceof TypeOperatorType ;
11
9
}
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { TypeParameterType } from "../../../models";
3
3
import { TypeSerializerComponent } from "../../components" ;
4
4
import { TypeParameterType as JSONTypeParameterType } from "../../schema" ;
5
5
6
- export class TypeParameterTypeSerializer extends TypeSerializerComponent <
7
- TypeParameterType
8
- > {
6
+ export class TypeParameterTypeSerializer extends TypeSerializerComponent < TypeParameterType > {
9
7
supports ( t : unknown ) {
10
8
return t instanceof TypeParameterType ;
11
9
}
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { UnknownType } from "../../../models";
3
3
import { TypeSerializerComponent } from "../../components" ;
4
4
import { UnknownType as JSONUnknownType } from "../../schema" ;
5
5
6
- export class UnknownTypeSerializer extends TypeSerializerComponent <
7
- UnknownType
8
- > {
6
+ export class UnknownTypeSerializer extends TypeSerializerComponent < UnknownType > {
9
7
supports ( t : unknown ) {
10
8
return t instanceof UnknownType ;
11
9
}
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ export function mapped<T>(arg: T) {
4
4
5
5
export type Mappy < T > = { [ K in keyof T ] : T [ K ] } ;
6
6
7
- export type DoubleKey < T > = { [ K in keyof T & string as `${K } ${K } `] : T [ K ] }
7
+ export type DoubleKey < T > = { [ K in keyof T & string as `${K } ${K } `] : T [ K ] } ;
8
8
9
9
export function doubleKey < T > ( arg : T ) {
10
- return { } as { [ K in keyof T & string as `${K } ${K } `] : T [ K ] }
10
+ return { } as { [ K in keyof T & string as `${K } ${K } `] : T [ K ] } ;
11
11
}
You can’t perform that action at this time.
0 commit comments