Skip to content

Instantly share code, notes, and snippets.

def el = __context__;
if (el instanceof com.intellij.lang.javascript.psi.JSReferenceExpression) {
while (true) {
el = el.getParent()
if (el == null) return false
if (el instanceof com.intellij.lang.javascript.psi.JSFunction) {
return __context__.getReferenceName().equals(el.getName())
}
}
}
java.lang.StackOverflowError
at com.intellij.util.indexing.FileBasedIndexImpl.projectIndexableFiles(FileBasedIndexImpl.java:1032)
at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.<init>(StubIndexImpl.java:606)
at com.intellij.psi.stubs.StubIndexImpl$2.<init>(StubIndexImpl.java:323)
at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:323)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:145)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
at com.intellij.lang.javascript.frameworks.systemjs.SystemJSConfigFinder.getConfigLiterals(SystemJSConfigFinder.java:88)
at com.intellij.lang.javascript.frameworks.systemjs.SystemJSConfigFinder.getConfigsImpl(SystemJSConfigFinder.java:69)
at com.intellij.lang.javascript.frameworks.systemjs.SystemJSConfigFinder.getConfigs(SystemJSConfigFinder.java:59)
@anstarovoyt
anstarovoyt / tsconfig.json
Created June 3, 2016 15:54
tsconfig.json
{
"compilerOptions": {
"target": "ES5",
"inlineSources": true,
"module": "system",
"moduleResolution": "node",
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noEmitHelpers": false,
https://github.com/JetBrains/intellij-community/blob/0e2024250014398980eb0ee08fba74c6f866bd95/platform/analysis-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReference.java#L460
@anstarovoyt
anstarovoyt / typescript_import_export
Created July 17, 2015 10:44
typescript import/export
module Rx2 {
export interface A {}
}
declare module 'Rx' {
export = Rx2;
}
declare module 'Rx/2' {
export {A} from 'Rx';