eclipse-typescript icon indicating copy to clipboard operation
eclipse-typescript copied to clipboard

tsconfig supports *.js files but fails in plugin

Open jltnf54 opened this issue 8 years ago • 4 comments

check use tsconfig does not appear to support loading *.js files.

java.lang.RuntimeException: The following request caused an error to be thrown: {"endpoint":"language","method":"getAllDiagnostics","arguments":["my-webapp"]} Error: Could not find file: 'eclipse:/my-webapp/src/main/webapp/static/lib/my-libs/js/my-autofocus.js'. at getValidSourceFile (C:\Development\Tools\Spring\3.7.3\spring-tool-suite-3.7.3.RELEASE-e4.6-win32-x86_64\sts-bundle\sts-3.7.3.RELEASE\plugins\com.palantir.typescript_2.1.0.201701220748\bin\bridge.js:79256:23)

jltnf54 avatar Jan 22 '17 08:01 jltnf54

This is weird, are you sure you have the xx.d.ts ?

Im not sure you can link .js files. When you go TypeScript, TypeScript is god. :)

Rouche avatar Jan 23 '17 00:01 Rouche

yes it pulls in the right *.d.ts files,

see: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html -allowJs thanks.

jltnf54 avatar Jan 23 '17 00:01 jltnf54

Just checked, this is the list of options read from tsconfig, allowJs is not there:

        map.put(IPreferenceConstants.BUILD_PATH_FILES, "files");
        map.put(IPreferenceConstants.BUILD_PATH_INCLUDE, "include");
        map.put(IPreferenceConstants.BUILD_PATH_EXCLUDE, "exclude");

        map.put(IPreferenceConstants.COMPILER_COMPILE_ON_SAVE, "compileOnSave");
        map.put(IPreferenceConstants.COMPILER_DECLARATION, "compilerOptions.declaration");
        map.put(IPreferenceConstants.COMPILER_EXPERIMENTAL_DECORATORS, "compilerOptions.experimentalDecorators");
        map.put(IPreferenceConstants.COMPILER_EMIT_DECORATOR_METADATA, "compilerOptions.emitDecoratorMetadata");
        map.put(IPreferenceConstants.COMPILER_INLINE_SOURCE_MAP, "compilerOptions.inlineSourceMap");
        map.put(IPreferenceConstants.COMPILER_INLINE_SOURCES, "compilerOptions.inlineSource");
        map.put(IPreferenceConstants.COMPILER_JSX, "compilerOptions.jsx");
        map.put(IPreferenceConstants.COMPILER_MODULE, "compilerOptions.module");
        map.put(IPreferenceConstants.COMPILER_MODULE_RESOLUTION, "compilerOptions.moduleResolution");
        map.put(IPreferenceConstants.COMPILER_NO_EMIT_ON_ERROR, "compilerOptions.noEmitOnError");
        map.put(IPreferenceConstants.COMPILER_NO_FALLTHROUGH_CASES_IN_SWITCH, "compilerOptions.noFallthroughCasesInSwitch");
        map.put(IPreferenceConstants.COMPILER_NO_IMPLICIT_ANY, "compilerOptions.noImplicitAny");
        map.put(IPreferenceConstants.COMPILER_NO_IMPLICIT_RETURNS, "compilerOptions.noImplicitReturns");
        map.put(IPreferenceConstants.COMPILER_NO_LIB, "compilerOptions.noLib");
        map.put(IPreferenceConstants.COMPILER_OUT_DIR, "compilerOptions.outDir");
        map.put(IPreferenceConstants.COMPILER_OUT_FILE, "compilerOptions.outFile");
        map.put(IPreferenceConstants.COMPILER_REMOVE_COMMENTS, "compilerOptions.removeComments");
        map.put(IPreferenceConstants.COMPILER_SOURCE_MAP, "compilerOptions.sourceMap");
        map.put(IPreferenceConstants.COMPILER_SUPPRESS_EXCESS_PROPERTY_ERRORS, "compilerOptions.suppressExcessPropertyErrors");
        map.put(IPreferenceConstants.COMPILER_SUPPRESS_IMPLICIT_ANY_INDEX_ERRORS, "compilerOptions.suppressImplicitAnyIndexErrors");
        map.put(IPreferenceConstants.COMPILER_TARGET, "compilerOptions.target");

Rouche avatar Feb 07 '17 13:02 Rouche

Unfortunately we only have partial tsconfig support for now. PR will be welcome though :)

sixinli avatar Feb 07 '17 19:02 sixinli