Skip to content

Commit ac50e9d

Browse files
authored
gts: resolve property on any to any and do not show errors for it (#274)
* resolve props on any to any
1 parent da0fec3 commit ac50e9d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/kotlin/com/emberjs/hbs/HbsLocalReference.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import com.intellij.lang.javascript.psi.impl.JSUseScopeProvider
2727
import com.intellij.lang.javascript.psi.impl.JSVariableImpl
2828
import com.intellij.lang.javascript.psi.jsdoc.impl.JSDocCommentImpl
2929
import com.intellij.lang.javascript.psi.resolve.JSContextResolver
30+
import com.intellij.lang.javascript.psi.types.JSAnyType
3031
import com.intellij.lang.javascript.psi.types.JSRecordTypeImpl
3132
import com.intellij.lang.javascript.psi.types.recordImpl.PropertySignatureImpl
3233
import com.intellij.openapi.util.TextRange
@@ -319,6 +320,9 @@ class HbsLocalReference(private val leaf: PsiElement, val resolved: Any?) : HbRe
319320
val elem = jsType.findPropertySignature(path.first())
320321
return resolveToJs(elem, path.subList(1, max(path.lastIndex, 1)), resolveIncomplete, recursionCounter + 1)
321322
}
323+
if (jsType is JSAnyType) {
324+
return any
325+
}
322326
jsType = EmberUtils.handleEmberProxyTypes(jsType) ?: jsType
323327
jsType = jsType.asRecordType()
324328
if (jsType is JSRecordTypeImpl) {

0 commit comments

Comments
 (0)