File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -95,32 +95,4 @@ export class PromiseNodeParser implements SubNodeParser {
95
95
96
96
return node . name ?. getText ( ) ;
97
97
}
98
-
99
- /**
100
- * If specified node extends Promise or PromiseLike and nothing else then this method returns the
101
- * array item type. In all other cases null is returned to indicate that the node is not a simple promise.
102
- *
103
- * @param node - The interface or class to check.
104
- * @return The promise item type if node is an promise, null otherwise.
105
- */
106
- protected getPromiseItemType ( node : ts . InterfaceDeclaration | ts . ClassDeclaration ) : ts . TypeNode | null {
107
- if ( node . heritageClauses && node . heritageClauses . length === 1 ) {
108
- const clause = node . heritageClauses [ 0 ] ;
109
-
110
- if ( clause . types . length === 1 ) {
111
- const type = clause . types [ 0 ] ;
112
- const symbol = this . typeChecker . getSymbolAtLocation ( type . expression ) ;
113
-
114
- if ( symbol && ( symbol . name === "Promise" || symbol . name === "PromiseLike" ) ) {
115
- const typeArguments = type . typeArguments ;
116
-
117
- if ( typeArguments ?. length === 1 ) {
118
- return typeArguments [ 0 ] ;
119
- }
120
- }
121
- }
122
- }
123
-
124
- return null ;
125
- }
126
98
}
You can’t perform that action at this time.
0 commit comments