@@ -6,7 +6,7 @@ import {Context} from "../context";
66
77
88@Component ( { name :'type:string-literal' } )
9- export class StringLiteralConverter extends ConverterTypeComponent implements ITypeConverter < ts . StringLiteralType , ts . StringLiteral >
9+ export class StringLiteralConverter extends ConverterTypeComponent implements ITypeConverter < ts . LiteralType , ts . StringLiteral >
1010{
1111 /**
1212 * Test whether this converter can handle the given TypeScript node.
@@ -19,7 +19,7 @@ export class StringLiteralConverter extends ConverterTypeComponent implements IT
1919 /**
2020 * Test whether this converter can handle the given TypeScript type.
2121 */
22- supportsType ( context :Context , type :ts . StringLiteralType ) :boolean {
22+ supportsType ( context :Context , type :ts . LiteralType ) :boolean {
2323 return ! ! ( type . flags & ts . TypeFlags . StringLiteral ) ;
2424 }
2525
@@ -36,7 +36,7 @@ export class StringLiteralConverter extends ConverterTypeComponent implements IT
3636 * @param node The string literal node that should be converted.
3737 * @returns The type reflection representing the given string literal node.
3838 */
39- convertNode ( context :Context , node :ts . StringLiteral ) :StringLiteralType {
39+ convertNode ( context :Context , node :ts . StringLiteral ) :Type {
4040 return new StringLiteralType ( node . text ) ;
4141 }
4242
@@ -53,7 +53,7 @@ export class StringLiteralConverter extends ConverterTypeComponent implements IT
5353 * @param type The intrinsic type that should be converted.
5454 * @returns The type reflection representing the given string literal type.
5555 */
56- convertType ( context :Context , type :ts . StringLiteralType ) : StringLiteralType {
56+ convertType ( context :Context , type :ts . LiteralType ) : Type {
5757 return new StringLiteralType ( type . text ) ;
5858 }
5959}
0 commit comments