Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initializing js/ts language features never completes #68896

Closed
brunoscopelliti opened this issue Feb 18, 2019 · 41 comments
Closed

initializing js/ts language features never completes #68896

brunoscopelliti opened this issue Feb 18, 2019 · 41 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone

Comments

@brunoscopelliti
Copy link

  • VSCode Version: Versione 1.31.1 (1.31.1) (1b8e830)
  • OS Version: Mac OS Mojave

Steps to Reproduce:

  1. Open vscode.
  2. Start working on a JavaScript project.
  3. Keep working for at least 10 minutes, doing normal work, that is:
    write code, open multiple files, switching between files, write code...
    and then, apparently without any particular reason the error occurs.

Does this issue occur when all extensions are disabled?: Yes. I've tried.

I know these are not the best steps to reproduce in the world,
but I was not able to identify a common pattern in the errors,
also cause I don't immediately notice the error, until I need to toggle a region.

After the error occurs the editor is almost completely frozen.
I can edit the code, but I cannot open/close regions of code.
The only way to restore functionalities is to close/reopen vscode.
This is happened at least 5 times to me only in the last hour.

@vscodebot vscodebot bot added the javascript JavaScript support issues label Feb 18, 2019
@brunoscopelliti brunoscopelliti changed the title initializing js/ts language features initializing js/ts language features never completes Feb 18, 2019
@sanket-bhalerao
Copy link

for me the typescript intellisense is not working.
also the tslint save on fix is not taking any effect. issue started to appear after today's update (for me its insiders.)

@brunoscopelliti
Copy link
Author

I'm experiencing this issue since waaaaay longer than today.
I've not a typescript solution.
I use eslint, but I'm not using "--fix" on save.

What does exactly mean "initializing js/ts language features"? What are the features we are talking about? Is it possible to disable these features? What would I miss in case?

Any help is deeply appreciated.
I absolutely love vscode, but this issue is becoming a deal breaker for me.

@joshsweaney
Copy link

Also having this issue. No extensions installed, no themes. Been experiencing this even after a fresh install. v1.31.1, Windows 10.

@sanket-bhalerao
Copy link

sanket-bhalerao commented Feb 18, 2019

For me the issue resolved after latest update in vsc insiders.

@brunoscopelliti
Copy link
Author

I've tried latest (bbe40c8) insiders this morning... sadly I can still replicate the problem.

After first time I reproduced the issue today, I started a video registration, and then continued to work normally. I was able to see the exact moment in which the error occurs. Apparently I didn't any special, I just cut a piece of JSX from a React component.
This made me think that the issue is far way more frequent when I am working on a React application, or with JSX syntaxt.

Just after that I tried to take another recording of a simpler repro, but the surprisingly thing is that now both vscode, and insiders have the issue with whatever javascript files (even with an empty file). I've also restarted my mac, but it was useless.

Hope this helps.

@brunoscopelliti
Copy link
Author

@joshsweaney Could you share a bit more information about the project you are working? JavaScript? Typescript? Perhaps a React application? Thank you.

@7cc
Copy link

7cc commented Feb 19, 2019

workaround, open vscode command palette and hit ts
reset-ts

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Feb 20, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 20, 2019

Please try checking the TypeScript Server trace:

  1. Set "typescript.tsserver.trace": "verbose"
  2. Reproduce the problem
  3. Open the output panel and view the TypeScript section

Are there any errors or stack traces printed near the end?

Also, is initializing ... visible from when you first a js file in the workspace? Or is there some point where it is triggered?

@brunoscopelliti
Copy link
Author

@7cc, Thanks, that helped to reduce the pain.

@mjbvz The nitializing... message is visible when I open vscode, then it usually disappear... and then randomly it reappear, and at this point never completes.
I've enabled the verbose logging, and I'll come back with more info in the coming days.

Thanks for the help so far.

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 22, 2019

Thanks. Please sure to test using the latest VS Code insiders build too. I made a small fix yesterday that could have effected this issue

@brunoscopelliti
Copy link
Author

Hi @mjbvz .

I've followed your instructions.
I've upgraded insiders to latest build: 1.32.0 (11416de)

I still can reproduce the issue.
This is the output of the console:

[Trace  - 7:59:33 AM] Sending request: quickinfo (48). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "[**********************]/tests/index.js",
    "line": 137,
    "offset": 14
}
[Trace  - 7:59:33 AM] Response received: quickinfo (48). Request took 1 ms. Success: false . Message: No content available.
[Trace  - 7:59:33 AM] Sending request: quickinfo (49). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "[**********************]/tests/index.js",
    "line": 133,
    "offset": 9
}
[Trace  - 7:59:33 AM] Response received: quickinfo (49). Request took 1 ms. Success: false . Message: No content available.
[Trace  - 7:59:34 AM] Sending request: getApplicableRefactors (50). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "[**********************]/tests/index.js",
    "startLine": 133,
    "startOffset": 10,
    "endLine": 133,
    "endOffset": 10
}
[Trace  - 7:59:34 AM] Response received: getApplicableRefactors (50). Request took 1 ms. Success: true 
Result: []
[Trace  - 7:59:34 AM] Sending request: quickinfo (51). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "[**********************]/tests/index.js",
    "line": 133,
    "offset": 10
}
[Trace  - 7:59:34 AM] Response received: quickinfo (51). Request took 1 ms. Success: false . Message: No content available.
[Trace  - 7:59:34 AM] Sending request: definitionAndBoundSpan (52). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "[**********************]/tests/index.js",
    "line": 134,
    "offset": 9
}
[Trace  - 7:59:34 AM] Response received: definitionAndBoundSpan (52). Request took 9 ms. Success: true 
Result: {
    "definitions": [
        {
            "file": "/Users/brunoscopelliti/Library/Caches/typescript/3.3/node_modules/@types/jest/index.d.ts",
            "start": {
                "line": 582,
                "offset": 9
            },
            "end": {
                "line": 582,
                "offset": 13
            }
        }
    ],
    "textSpan": {
        "start": {
            "line": 134,
            "offset": 7
        },
        "end": {
            "line": 134,
            "offset": 11
        }
    }
}
[Trace  - 7:59:34 AM] Sending request: open (53). Response expected: no. Current queue length: 0
Arguments: {
    "file": "/Users/brunoscopelliti/Library/Caches/typescript/3.3/node_modules/@types/jest/index.d.ts",
    "fileContent": "// Type definitions for Jest 24.0\n// Project: http://facebook.github.io/jest/\n// Definitions by: Asana <https://asana.com>\n//                 Ivo Stratev <https://github.com/NoHomey>\n//                 jwbay <https://github.com/jwbay>\n//                 Alexey Svetliakov <https://github.com/asvetliakov>\n//                 Alex Jover Morales <https://github.com/alexjoverm>\n//                 Allan Lukwago <https://github.com/epicallan>\n//                 Ika <https://github.com/ikatyang>\n//                 Waseem Dahman <https://github.com/wsmd>\n//                 Jamie Mason <https://github.com/JamieMason>\n//                 Douglas Duteil <https://github.com/douglasduteil>\n//                 Ahn <https://github.com/ahnpnl>\n//                 Josh Goldberg <https://github.com/joshuakgoldberg>\n//                 Jeff Lau <https://github.com/UselessPickles>\n//                 Andrew Makarov <https://github.com/r3nya>\n//                 Martin Hochel <https://github.com/hotell>\n//                 Sebastian Sebald <https://github.com/sebald>\n//                 Andy <https://github.com/andys8>\n//                 Antoine Brault <https://github.com/antoinebrault>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 3.0\n\n/// <reference types=\"jest-diff\" />\n\ndeclare var beforeAll: jest.Lifecycle;\ndeclare var beforeEach: jest.Lifecycle;\ndeclare var afterAll: jest.Lifecycle;\ndeclare var afterEach: jest.Lifecycle;\ndeclare var describe: jest.Describe;\ndeclare var fdescribe: jest.Describe;\ndeclare var xdescribe: jest.Describe;\ndeclare var it: jest.It;\ndeclare var fit: jest.It;\ndeclare var xit: jest.It;\ndeclare var test: jest.It;\ndeclare var xtest: jest.It;\n\ndeclare const expect: jest.Expect;\n\ninterface NodeRequire {\n    /**\n     * Returns the actual module instead of a mock, bypassing all checks on\n     * whether the module should receive a mock implementation or not.\n     *\n     * @deprecated Use `jest.requireActual` instead.\n     */\n    requireActual(moduleName: string): any;\n    /**\n     * Returns a mock module instead of the actual module, bypassing all checks\n     * on whether the module should be required normally or not.\n     *\n     * @deprecated Use `jest.requireMock`instead.\n     */\n    requireMock(moduleName: string): any;\n}\n\ndeclare namespace jest {\n    /**\n     * Provides a way to add Jasmine-compatible matchers into your Jest context.\n     */\n    function addMatchers(matchers: jasmine.CustomMatcherFactories): typeof jest;\n    /**\n     * Disables automatic mocking in the module loader.\n     */\n    function autoMockOff(): typeof jest;\n    /**\n     * Enables automatic mocking in the module loader.\n     */\n    function autoMockOn(): typeof jest;\n    /**\n     * Clears the mock.calls and mock.instances properties of all mocks.\n     * Equivalent to calling .mockClear() on every mocked function.\n     */\n    function clearAllMocks(): typeof jest;\n    /**\n     * Resets the state of all mocks.\n     * Equivalent to calling .mockReset() on every mocked function.\n     */\n    function resetAllMocks(): typeof jest;\n    /**\n     * available since Jest 21.1.0\n     * Restores all mocks back to their original value.\n     * Equivalent to calling .mockRestore on every mocked function.\n     * Beware that jest.restoreAllMocks() only works when mock was created with\n     * jest.spyOn; other mocks will require you to manually restore them.\n     */\n    function restoreAllMocks(): typeof jest;\n    /**\n     * Removes any pending timers from the timer system. If any timers have\n     * been scheduled, they will be cleared and will never have the opportunity\n     * to execute in the future.\n     */\n    function clearAllTimers(): typeof jest;\n    /**\n     * Indicates that the module system should never return a mocked version\n     * of the specified module, including all of the specificied module's dependencies.\n     */\n    function deepUnmock(moduleName: string): typeof jest;\n    /**\n     * Disables automatic mocking in the module loader.\n     */\n    function disableAutomock(): typeof jest;\n    /**\n     * Mocks a module with an auto-mocked version when it is being required.\n     */\n    function doMock(moduleName: string, factory?: any, options?: MockOptions): typeof jest;\n    /**\n     * Indicates that the module system should never return a mocked version\n     * of the specified module from require() (e.g. that it should always return the real module).\n     */\n    function dontMock(moduleName: string): typeof jest;\n    /**\n     * Enables automatic mocking in the module loader.\n     */\n    function enableAutomock(): typeof jest;\n    /**\n     * Creates a mock function. Optionally takes a mock implementation.\n     */\n    function fn(): Mock;\n    /**\n     * Creates a mock function. Optionally takes a mock implementation.\n     */\n    function fn<T, Y extends any[]>(implementation?: (...args: Y) => T): Mock<T, Y>;\n    /**\n     * Use the automatic mocking system to generate a mocked version of the given module.\n     */\n    function genMockFromModule<T>(moduleName: string): T;\n    /**\n     * Returns whether the given function is a mock function.\n     */\n    function isMockFunction(fn: any): fn is Mock;\n    /**\n     * Mocks a module with an auto-mocked version when it is being required.\n     */\n    function mock(moduleName: string, factory?: any, options?: MockOptions): typeof jest;\n    /**\n     * Returns the actual module instead of a mock, bypassing all checks on\n     * whether the module should receive a mock implementation or not.\n     */\n    function requireActual(moduleName: string): any;\n    /**\n     * Returns a mock module instead of the actual module, bypassing all checks\n     * on whether the module should be required normally or not.\n     */\n    function requireMock(moduleName: string): any;\n    /**\n     * Resets the module registry - the cache of all required modules. This is\n     * useful to isolate modules where local state might conflict between tests.\n     */\n    function resetModuleRegistry(): typeof jest;\n    /**\n     * Resets the module registry - the cache of all required modules. This is\n     * useful to isolate modules where local state might conflict between tests.\n     */\n    function resetModules(): typeof jest;\n    /**\n     * Runs failed tests n-times until they pass or until the max number of retries is exhausted.\n     * This only works with jest-circus!\n     */\n    function retryTimes(numRetries: number): typeof jest;\n    /**\n     * Exhausts tasks queued by setImmediate().\n     */\n    function runAllImmediates(): typeof jest;\n    /**\n     * Exhausts the micro-task queue (usually interfaced in node via process.nextTick).\n     */\n    function runAllTicks(): typeof jest;\n    /**\n     * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout() and setInterval()).\n     */\n    function runAllTimers(): typeof jest;\n    /**\n     * Executes only the macro-tasks that are currently pending (i.e., only the\n     * tasks that have been queued by setTimeout() or setInterval() up to this point).\n     * If any of the currently pending macro-tasks schedule new macro-tasks,\n     * those new tasks will not be executed by this call.\n     */\n    function runOnlyPendingTimers(): typeof jest;\n    /**\n     * (renamed to `advanceTimersByTime` in Jest 21.3.0+) Executes only the macro\n     * task queue (i.e. all tasks queued by setTimeout() or setInterval() and setImmediate()).\n     */\n    function runTimersToTime(msToRun: number): typeof jest;\n    /**\n     * Advances all timers by msToRun milliseconds. All pending \"macro-tasks\" that have been\n     * queued via setTimeout() or setInterval(), and would be executed within this timeframe\n     * will be executed.\n     */\n    function advanceTimersByTime(msToRun: number): typeof jest;\n    /**\n     * Explicitly supplies the mock object that the module system should return\n     * for the specified module.\n     */\n    function setMock<T>(moduleName: string, moduleExports: T): typeof jest;\n    /**\n     * Set the default timeout interval for tests and before/after hooks in milliseconds.\n     * Note: The default timeout interval is 5 seconds if this method is not called.\n     */\n    function setTimeout(timeout: number): typeof jest;\n    /**\n     * Creates a mock function similar to jest.fn but also tracks calls to `object[methodName]`\n     *\n     * Note: By default, jest.spyOn also calls the spied method. This is different behavior from most\n     * other test libraries.\n     *\n     * @example\n     *\n     * const video = require('./video');\n     *\n     * test('plays video', () => {\n     *   const spy = jest.spyOn(video, 'play');\n     *   const isPlaying = video.play();\n     *\n     *   expect(spy).toHaveBeenCalled();\n     *   expect(isPlaying).toBe(true);\n     *\n     *   spy.mockReset();\n     *   spy.mockRestore();\n     * });\n     */\n    function spyOn<T extends {}, M extends NonFunctionPropertyNames<T>>(object: T, method: M, accessType: 'get'): SpyInstance<T[M], []>;\n    function spyOn<T extends {}, M extends NonFunctionPropertyNames<T>>(object: T, method: M, accessType: 'set'): SpyInstance<void, [T[M]]>;\n    function spyOn<T extends {}, M extends FunctionPropertyNames<T>>(object: T, method: M): T[M] extends (...args: any[]) => any ? SpyInstance<ReturnType<T[M]>, ArgsType<T[M]>> : never;\n    /**\n     * Indicates that the module system should never return a mocked version of\n     * the specified module from require() (e.g. that it should always return the real module).\n     */\n    function unmock(moduleName: string): typeof jest;\n    /**\n     * Instructs Jest to use fake versions of the standard timer functions.\n     */\n    function useFakeTimers(): typeof jest;\n    /**\n     * Instructs Jest to use the real versions of the standard timer functions.\n     */\n    function useRealTimers(): typeof jest;\n\n    interface MockOptions {\n        virtual?: boolean;\n    }\n\n    type EmptyFunction = () => void;\n    type ArgsType<T> = T extends (...args: infer A) => any ? A : never;\n    type RejectedValue<T> = T extends PromiseLike<any> ? any : never;\n    type ResolvedValue<T> = T extends PromiseLike<infer U> ? U | T : never;\n    // see https://github.com/Microsoft/TypeScript/issues/25215\n    type NonFunctionPropertyNames<T> = { [K in keyof T]: T[K] extends (...args: any[]) => any ? never : K }[keyof T] & string;\n    type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never }[keyof T] & string;\n\n    interface DoneCallback {\n        (...args: any[]): any;\n        fail(error?: string | { message: string }): any;\n    }\n\n    type ProvidesCallback = (cb: DoneCallback) => any;\n\n    type Lifecycle = (fn: ProvidesCallback, timeout?: number) => any;\n\n    interface FunctionLike {\n        readonly name: string;\n    }\n\n    interface Each {\n        (cases: any[]): (name: string, fn: (...args: any[]) => any) => void;\n        (strings: TemplateStringsArray, ...placeholders: any[]): (\n            name: string,\n            fn: (arg: any) => any\n        ) => void;\n    }\n\n    /**\n     * Creates a test closure\n     */\n    interface It {\n        /**\n         * Creates a test closure.\n         *\n         * @param name The name of your test\n         * @param fn The function for your test\n         * @param timeout The timeout for an async function test\n         */\n        (name: string, fn?: ProvidesCallback, timeout?: number): void;\n        /**\n         * Only runs this test in the current file.\n         */\n        only: It;\n        /**\n         * Skips running this test in the current file.\n         */\n        skip: It;\n        /**\n         * Sketch out which tests to write in the future.\n         */\n        todo: It;\n        /**\n         * Experimental and should be avoided.\n         */\n        concurrent: It;\n        /**\n         * Use if you keep duplicating the same test with different data. `.each` allows you to write the\n         * test once and pass data in.\n         *\n         * `.each` is available with two APIs:\n         *\n         * #### 1  `test.each(table)(name, fn)`\n         *\n         * - `table`: Array of Arrays with the arguments that are passed into the test fn for each row.\n         * - `name`: String the title of the test block.\n         * - `fn`: Function the test to be ran, this is the function that will receive the parameters in each row as function arguments.\n         *\n         *\n         * #### 2  `test.each table(name, fn)`\n         *\n         * - `table`: Tagged Template Literal\n         * - `name`: String the title of the test, use `$variable` to inject test data into the test title from the tagged template expressions.\n         * - `fn`: Function the test to be ran, this is the function that will receive the test data object..\n         *\n         * @example\n         *\n         * // API 1\n         * test.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(\n         *   '.add(%i, %i)',\n         *   (a, b, expected) => {\n         *     expect(a + b).toBe(expected);\n         *   },\n         * );\n         *\n         * // API 2\n         * test.each`\n         * a    | b    | expected\n         * ${1} | ${1} | ${2}\n         * ${1} | ${2} | ${3}\n         * ${2} | ${1} | ${3}\n         * `('returns $expected when $a is added $b', ({a, b, expected}) => {\n         *    expect(a + b).toBe(expected);\n         * });\n         *\n         */\n        each: Each;\n    }\n\n    interface Describe {\n        // tslint:disable-next-line ban-types\n        (name: number | string | Function | FunctionLike, fn: EmptyFunction): void;\n        /** Only runs the tests inside this `describe` for the current file */\n        only: Describe;\n        /** Skips running the tests inside this `describe` for the current file */\n        skip: Describe;\n        each: Each;\n    }\n\n    interface MatcherUtils {\n        readonly expand: boolean;\n        readonly isNot: boolean;\n        utils: {\n            readonly EXPECTED_COLOR: (text: string) => string;\n            readonly RECEIVED_COLOR: (text: string) => string;\n            diff: typeof import('jest-diff');\n            ensureActualIsNumber(actual: any, matcherName?: string): void;\n            ensureExpectedIsNumber(actual: any, matcherName?: string): void;\n            ensureNoExpected(actual: any, matcherName?: string): void;\n            ensureNumbers(actual: any, expected: any, matcherName?: string): void;\n            /**\n             * get the type of a value with handling of edge cases like `typeof []` and `typeof null`\n             */\n            getType(value: any): string;\n            matcherHint(matcherName: string, received?: string, expected?: string, options?: { secondArgument?: string, isDirectExpectCall?: boolean }): string;\n            pluralize(word: string, count: number): string;\n            printExpected(value: any): string;\n            printReceived(value: any): string;\n            printWithType(name: string, received: any, print: (value: any) => string): string;\n            stringify(object: {}, maxDepth?: number): string;\n        };\n        /**\n         *  This is a deep-equality function that will return true if two objects have the same values (recursively).\n         */\n        equals(a: any, b: any): boolean;\n    }\n\n    interface ExpectExtendMap {\n        [key: string]: CustomMatcher;\n    }\n\n    type CustomMatcher = (this: MatcherUtils, received: any, ...actual: any[]) => CustomMatcherResult | Promise<CustomMatcherResult>;\n\n    interface CustomMatcherResult {\n        pass: boolean;\n        message: string | (() => string);\n    }\n\n    interface SnapshotSerializerOptions {\n        callToJSON?: boolean;\n        edgeSpacing?: string;\n        spacing?: string;\n        escapeRegex?: boolean;\n        highlight?: boolean;\n        indent?: number;\n        maxDepth?: number;\n        min?: boolean;\n        plugins?: SnapshotSerializerPlugin[];\n        printFunctionName?: boolean;\n        theme?: SnapshotSerializerOptionsTheme;\n\n        // see https://github.com/facebook/jest/blob/e56103cf142d2e87542ddfb6bd892bcee262c0e6/types/PrettyFormat.js\n    }\n    interface SnapshotSerializerOptionsTheme {\n        comment?: string;\n        content?: string;\n        prop?: string;\n        tag?: string;\n        value?: string;\n    }\n    interface SnapshotSerializerColor {\n        close: string;\n        open: string;\n    }\n    interface SnapshotSerializerColors {\n        comment: SnapshotSerializerColor;\n        content: SnapshotSerializerColor;\n        prop: SnapshotSerializerColor;\n        tag: SnapshotSerializerColor;\n        value: SnapshotSerializerColor;\n    }\n    interface SnapshotSerializerPlugin {\n        print(val: any, serialize: ((val: any) => string), indent: ((str: string) => string), opts: SnapshotSerializerOptions, colors: SnapshotSerializerColors): string;\n        test(val: any): boolean;\n    }\n\n    interface InverseAsymmetricMatchers {\n        /**\n         * `expect.not.arrayContaining(array)` matches a received array which\n         * does not contain all of the elements in the expected array. That is,\n         * the expected array is not a subset of the received array. It is the\n         * inverse of `expect.arrayContaining`.\n         */\n        arrayContaining(arr: any[]): any;\n        /**\n         * `expect.not.objectContaining(object)` matches any received object\n         * that does not recursively match the expected properties. That is, the\n         * expected object is not a subset of the received object. Therefore,\n         * it matches a received object which contains properties that are not\n         * in the expected object. It is the inverse of `expect.objectContaining`.\n         */\n        objectContaining(obj: {}): any;\n        /**\n         * `expect.not.stringMatching(string | regexp)` matches the received\n         * string that does not match the expected regexp. It is the inverse of\n         * `expect.stringMatching`.\n         */\n        stringMatching(str: string | RegExp): any;\n        /**\n         * `expect.not.stringContaining(string)` matches the received string\n         * that does not contain the exact expected string. It is the inverse of\n         * `expect.stringContaining`.\n         */\n        stringContaining(str: string): any;\n    }\n\n    /**\n     * The `expect` function is used every time you want to test a value.\n     * You will rarely call `expect` by itself.\n     */\n    interface Expect {\n        /**\n         * The `expect` function is used every time you want to test a value.\n         * You will rarely call `expect` by itself.\n         *\n         * @param actual The value to apply matchers against.\n         */\n        <T = any>(actual: T): Matchers<T>;\n        /**\n         * Matches anything but null or undefined. You can use it inside `toEqual` or `toBeCalledWith` instead\n         * of a literal value. For example, if you want to check that a mock function is called with a\n         * non-null argument:\n         *\n         * @example\n         *\n         * test('map calls its argument with a non-null argument', () => {\n         *   const mock = jest.fn();\n         *   [1].map(x => mock(x));\n         *   expect(mock).toBeCalledWith(expect.anything());\n         * });\n         *\n         */\n        anything(): any;\n        /**\n         * Matches anything that was created with the given constructor.\n         * You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value.\n         *\n         * @example\n         *\n         * function randocall(fn) {\n         *   return fn(Math.floor(Math.random() * 6 + 1));\n         * }\n         *\n         * test('randocall calls its callback with a number', () => {\n         *   const mock = jest.fn();\n         *   randocall(mock);\n         *   expect(mock).toBeCalledWith(expect.any(Number));\n         * });\n         */\n        any(classType: any): any;\n        /**\n         * Matches any array made up entirely of elements in the provided array.\n         * You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value.\n         */\n        arrayContaining(arr: any[]): any;\n        /**\n         * Verifies that a certain number of assertions are called during a test.\n         * This is often useful when testing asynchronous code, in order to\n         * make sure that assertions in a callback actually got called.\n         */\n        assertions(num: number): void;\n        /**\n         * Verifies that at least one assertion is called during a test.\n         * This is often useful when testing asynchronous code, in order to\n         * make sure that assertions in a callback actually got called.\n         */\n        hasAssertions(): void;\n        /**\n         * You can use `expect.extend` to add your own matchers to Jest.\n         */\n        extend(obj: ExpectExtendMap): void;\n        /**\n         * Adds a module to format application-specific data structures for serialization.\n         */\n        addSnapshotSerializer(serializer: SnapshotSerializerPlugin): void;\n        /**\n         * Matches any object that recursively matches the provided keys.\n         * This is often handy in conjunction with other asymmetric matchers.\n         */\n        objectContaining(obj: {}): any;\n        /**\n         * Matches any string that contains the exact provided string\n         */\n        stringMatching(str: string | RegExp): any;\n        /**\n         * Matches any received string that contains the exact expected string\n         */\n        stringContaining(str: string): any;\n\n        not: InverseAsymmetricMatchers;\n    }\n\n    interface Matchers<R> {\n        /**\n         * Ensures the last call to a mock function was provided specific args.\n         */\n        lastCalledWith(...args: any[]): R;\n        /**\n         * Ensure that the last call to a mock function has returned a specified value.\n         */\n        lastReturnedWith(value: any): R;\n        /**\n         * If you know how to test something, `.not` lets you test its opposite.\n         */\n        not: Matchers<R>;\n        /**\n         * Ensure that a mock function is called with specific arguments on an Nth call.\n         */\n        nthCalledWith(nthCall: number, ...params: any[]): R;\n        /**\n         * Ensure that the nth call to a mock function has returned a specified value.\n         */\n        nthReturnedWith(n: number, value: any): R;\n        /**\n         * Use resolves to unwrap the value of a fulfilled promise so any other\n         * matcher can be chained. If the promise is rejected the assertion fails.\n         */\n        resolves: Matchers<Promise<R>>;\n        /**\n         * Unwraps the reason of a rejected promise so any other matcher can be chained.\n         * If the promise is fulfilled the assertion fails.\n         */\n        rejects: Matchers<Promise<R>>;\n        /**\n         * Checks that a value is what you expect. It uses `===` to check strict equality.\n         * Don't use `toBe` with floating-point numbers.\n         */\n        toBe(expected: any): R;\n        /**\n         * Ensures that a mock function is called.\n         */\n        toBeCalled(): R;\n        /**\n         * Ensures that a mock function is called an exact number of times.\n         */\n        toBeCalledTimes(expected: number): R;\n        /**\n         * Ensure that a mock function is called with specific arguments.\n         */\n        toBeCalledWith(...args: any[]): R;\n        /**\n         * Using exact equality with floating point numbers is a bad idea.\n         * Rounding means that intuitive things fail.\n         * The default for numDigits is 2.\n         */\n        toBeCloseTo(expected: number, numDigits?: number): R;\n        /**\n         * Ensure that a variable is not undefined.\n         */\n        toBeDefined(): R;\n        /**\n         * When you don't care what a value is, you just want to\n         * ensure a value is false in a boolean context.\n         */\n        toBeFalsy(): R;\n        /**\n         * For comparing floating point numbers.\n         */\n        toBeGreaterThan(expected: number): R;\n        /**\n         * For comparing floating point numbers.\n         */\n        toBeGreaterThanOrEqual(expected: number): R;\n        /**\n         * Ensure that an object is an instance of a class.\n         * This matcher uses `instanceof` underneath.\n         */\n        toBeInstanceOf(expected: any): R;\n        /**\n         * For comparing floating point numbers.\n         */\n        toBeLessThan(expected: number): R;\n        /**\n         * For comparing floating point numbers.\n         */\n        toBeLessThanOrEqual(expected: number): R;\n        /**\n         * This is the same as `.toBe(null)` but the error messages are a bit nicer.\n         * So use `.toBeNull()` when you want to check that something is null.\n         */\n        toBeNull(): R;\n        /**\n         * Use when you don't care what a value is, you just want to ensure a value\n         * is true in a boolean context. In JavaScript, there are six falsy values:\n         * `false`, `0`, `''`, `null`, `undefined`, and `NaN`. Everything else is truthy.\n         */\n        toBeTruthy(): R;\n        /**\n         * Used to check that a variable is undefined.\n         */\n        toBeUndefined(): R;\n        /**\n         * Used to check that a variable is NaN.\n         */\n        toBeNaN(): R;\n        /**\n         * Used when you want to check that an item is in a list.\n         * For testing the items in the list, this uses `===`, a strict equality check.\n         */\n        toContain(expected: any): R;\n        /**\n         * Used when you want to check that an item is in a list.\n         * For testing the items in the list, this  matcher recursively checks the\n         * equality of all fields, rather than checking for object identity.\n         */\n        toContainEqual(expected: any): R;\n        /**\n         * Used when you want to check that two objects have the same value.\n         * This matcher recursively checks the equality of all fields, rather than checking for object identity.\n         */\n        toEqual(expected: any): R;\n        /**\n         * Ensures that a mock function is called.\n         */\n        toHaveBeenCalled(): R;\n        /**\n         * Ensures that a mock function is called an exact number of times.\n         */\n        toHaveBeenCalledTimes(expected: number): R;\n        /**\n         * Ensure that a mock function is called with specific arguments.\n         */\n        toHaveBeenCalledWith(...params: any[]): R;\n        /**\n         * Ensure that a mock function is called with specific arguments on an Nth call.\n         */\n        toHaveBeenNthCalledWith(nthCall: number, ...params: any[]): R;\n        /**\n         * If you have a mock function, you can use `.toHaveBeenLastCalledWith`\n         * to test what arguments it was last called with.\n         */\n        toHaveBeenLastCalledWith(...params: any[]): R;\n        /**\n         * Use to test the specific value that a mock function last returned.\n         * If the last call to the mock function threw an error, then this matcher will fail\n         * no matter what value you provided as the expected return value.\n         */\n        toHaveLastReturnedWith(expected: any): R;\n        /**\n         * Used to check that an object has a `.length` property\n         * and it is set to a certain numeric value.\n         */\n        toHaveLength(expected: number): R;\n        /**\n         * Use to test the specific value that a mock function returned for the nth call.\n         * If the nth call to the mock function threw an error, then this matcher will fail\n         * no matter what value you provided as the expected return value.\n         */\n        toHaveNthReturnedWith(nthCall: number, expected: any): R;\n        /**\n         * Use to check if property at provided reference keyPath exists for an object.\n         * For checking deeply nested properties in an object you may use dot notation or an array containing\n         * the keyPath for deep references.\n         *\n         * Optionally, you can provide a value to check if it's equal to the value present at keyPath\n         * on the target object. This matcher uses 'deep equality' (like `toEqual()`) and recursively checks\n         * the equality of all fields.\n         *\n         * @example\n         *\n         * expect(houseForSale).toHaveProperty('kitchen.area', 20);\n         */\n        toHaveProperty(propertyPath: string | any[], value?: any): R;\n        /**\n         * Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time\n         */\n        toHaveReturned(): R;\n        /**\n         * Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times.\n         * Any calls to the mock function that throw an error are not counted toward the number of times the function returned.\n         */\n        toHaveReturnedTimes(expected: number): R;\n        /**\n         * Use to ensure that a mock function returned a specific value.\n         */\n        toHaveReturnedWith(expected: any): R;\n        /**\n         * Check that a string matches a regular expression.\n         */\n        toMatch(expected: string | RegExp): R;\n        /**\n         * Used to check that a JavaScript object matches a subset of the properties of an object\n         */\n        toMatchObject(expected: {} | any[]): R;\n        /**\n         * This ensures that a value matches the most recent snapshot with property matchers.\n         * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information.\n         */\n        toMatchSnapshot<T extends {[P in keyof R]: any}>(propertyMatchers: Partial<T>, snapshotName?: string): R;\n        /**\n         * This ensures that a value matches the most recent snapshot.\n         * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information.\n         */\n        toMatchSnapshot(snapshotName?: string): R;\n        /**\n         * This ensures that a value matches the most recent snapshot with property matchers.\n         * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically.\n         * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information.\n         */\n        toMatchInlineSnapshot<T extends {[P in keyof R]: any}>(propertyMatchers: Partial<T>, snapshot?: string): R;\n        /**\n         * This ensures that a value matches the most recent snapshot with property matchers.\n         * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically.\n         * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information.\n         */\n        toMatchInlineSnapshot(snapshot?: string): R;\n        /**\n         * Ensure that a mock function has returned (as opposed to thrown) at least once.\n         */\n        toReturn(): R;\n        /**\n         * Ensure that a mock function has returned (as opposed to thrown) a specified number of times.\n         */\n        toReturnTimes(count: number): R;\n        /**\n         * Ensure that a mock function has returned a specified value at least once.\n         */\n        toReturnWith(value: any): R;\n        /**\n         * Use to test that objects have the same types as well as structure.\n         */\n        toStrictEqual(expected: {}): R;\n        /**\n         * Used to test that a function throws when it is called.\n         */\n        toThrow(error?: string | Constructable | RegExp | Error): R;\n        /**\n         * If you want to test that a specific error is thrown inside a function.\n         */\n        toThrowError(error?: string | Constructable | RegExp | Error): R;\n        /**\n         * Used to test that a function throws a error matching the most recent snapshot when it is called.\n         */\n        toThrowErrorMatchingSnapshot(): R;\n        /**\n         * Used to test that a function throws a error matching the most recent snapshot when it is called.\n         * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically.\n         */\n        toThrowErrorMatchingInlineSnapshot(snapshot?: string): R;\n    }\n\n    interface Constructable {\n        new (...args: any[]): any;\n    }\n\n    interface Mock<T = any, Y extends any[] = any> extends Function, MockInstance<T, Y> {\n        new (...args: Y): T;\n        (...args: Y): T;\n    }\n\n    interface SpyInstance<T = any, Y extends any[] = any> extends MockInstance<T, Y> {}\n\n    /**\n     * Wrap module with mock definitions\n     *\n     * @example\n     *\n     *  jest.mock(\"../api\");\n     *  import { Api } from \"../api\";\n     *\n     *  const myApi: jest.Mocked<Api> = new Api() as any;\n     *  myApi.myApiMethod.mockImplementation(() => \"test\");\n     */\n    type Mocked<T> = {\n        [P in keyof T]: T[P] extends (...args: any[]) => any ? MockInstance<ReturnType<T[P]>, ArgsType<T[P]>>: T[P];\n    } & T;\n\n    interface MockInstance<T, Y extends any[]> {\n        /** Returns the mock name string set by calling `mockFn.mockName(value)`. */\n        getMockName(): string;\n        /** Provides access to the mock's metadata */\n        mock: MockContext<T, Y>;\n        /**\n         * Resets all information stored in the mockFn.mock.calls and mockFn.mock.instances arrays.\n         *\n         * Often this is useful when you want to clean up a mock's usage data between two assertions.\n         *\n         * Beware that `mockClear` will replace `mockFn.mock`, not just `mockFn.mock.calls` and `mockFn.mock.instances`.\n         * You should therefore avoid assigning mockFn.mock to other variables, temporary or not, to make sure you\n         * don't access stale data.\n         */\n        mockClear(): void;\n        /**\n         * Resets all information stored in the mock, including any initial implementation and mock name given.\n         *\n         * This is useful when you want to completely restore a mock back to its initial state.\n         *\n         * Beware that `mockReset` will replace `mockFn.mock`, not just `mockFn.mock.calls` and `mockFn.mock.instances`.\n         * You should therefore avoid assigning mockFn.mock to other variables, temporary or not, to make sure you\n         * don't access stale data.\n         */\n        mockReset(): void;\n        /**\n         * Does everything that `mockFn.mockReset()` does, and also restores the original (non-mocked) implementation.\n         *\n         * This is useful when you want to mock functions in certain test cases and restore the original implementation in others.\n         *\n         * Beware that `mockFn.mockRestore` only works when mock was created with `jest.spyOn`. Thus you have to take care of restoration\n         * yourself when manually assigning `jest.fn()`.\n         *\n         * The [`restoreMocks`](https://jestjs.io/docs/en/configuration.html#restoremocks-boolean) configuration option is available\n         * to restore mocks automatically between tests.\n         */\n        mockRestore(): void;\n        /**\n         * Accepts a function that should be used as the implementation of the mock. The mock itself will still record\n         * all calls that go into and instances that come from itself – the only difference is that the implementation\n         * will also be executed when the mock is called.\n         *\n         * Note: `jest.fn(implementation)` is a shorthand for `jest.fn().mockImplementation(implementation)`.\n         */\n        mockImplementation(fn?: (...args: Y) => T): Mock<T, Y>;\n        /**\n         * Accepts a function that will be used as an implementation of the mock for one call to the mocked function.\n         * Can be chained so that multiple function calls produce different results.\n         *\n         * @example\n         *\n         * const myMockFn = jest\n         *   .fn()\n         *    .mockImplementationOnce(cb => cb(null, true))\n         *    .mockImplementationOnce(cb => cb(null, false));\n         *\n         * myMockFn((err, val) => console.log(val)); // true\n         *\n         * myMockFn((err, val) => console.log(val)); // false\n         */\n        mockImplementationOnce(fn: (...args: Y) => T): Mock<T, Y>;\n        /** Sets the name of the mock`. */\n        mockName(name: string): Mock<T, Y>;\n        /**\n         * Just a simple sugar function for:\n         *\n         * @example\n         *\n         *   jest.fn(function() {\n         *     return this;\n         *   });\n         */\n        mockReturnThis(): Mock<T, Y>;\n        /**\n         * Accepts a value that will be returned whenever the mock function is called.\n         *\n         * @example\n         *\n         * const mock = jest.fn();\n         * mock.mockReturnValue(42);\n         * mock(); // 42\n         * mock.mockReturnValue(43);\n         * mock(); // 43\n         */\n        mockReturnValue(value: T): Mock<T, Y>;\n        /**\n         * Accepts a value that will be returned for one call to the mock function. Can be chained so that\n         * successive calls to the mock function return different values. When there are no more\n         * `mockReturnValueOnce` values to use, calls will return a value specified by `mockReturnValue`.\n         *\n         * @example\n         *\n         * const myMockFn = jest.fn()\n         *   .mockReturnValue('default')\n         *   .mockReturnValueOnce('first call')\n         *   .mockReturnValueOnce('second call');\n         *\n         * // 'first call', 'second call', 'default', 'default'\n         * console.log(myMockFn(), myMockFn(), myMockFn(), myMockFn());\n         *\n         */\n        mockReturnValueOnce(value: T): Mock<T, Y>;\n        /**\n         * Simple sugar function for: `jest.fn().mockImplementation(() => Promise.resolve(value));`\n         */\n        mockResolvedValue(value: ResolvedValue<T>): Mock<T, Y>;\n        /**\n         * Simple sugar function for: `jest.fn().mockImplementationOnce(() => Promise.resolve(value));`\n         *\n         * @example\n         *\n         * test('async test', async () => {\n         *  const asyncMock = jest\n         *    .fn()\n         *    .mockResolvedValue('default')\n         *    .mockResolvedValueOnce('first call')\n         *    .mockResolvedValueOnce('second call');\n         *\n         *  await asyncMock(); // first call\n         *  await asyncMock(); // second call\n         *  await asyncMock(); // default\n         *  await asyncMock(); // default\n         * });\n         *\n         */\n        mockResolvedValueOnce(value: ResolvedValue<T>): Mock<T, Y>;\n        /**\n         * Simple sugar function for: `jest.fn().mockImplementation(() => Promise.reject(value));`\n         *\n         * @example\n         *\n         * test('async test', async () => {\n         *   const asyncMock = jest.fn().mockRejectedValue(new Error('Async error'));\n         *\n         *   await asyncMock(); // throws \"Async error\"\n         * });\n         */\n        mockRejectedValue(value: RejectedValue<T>): Mock<T, Y>;\n\n        /**\n         * Simple sugar function for: `jest.fn().mockImplementationOnce(() => Promise.reject(value));`\n         *\n         * @example\n         *\n         * test('async test', async () => {\n         *  const asyncMock = jest\n         *    .fn()\n         *    .mockResolvedValueOnce('first call')\n         *    .mockRejectedValueOnce(new Error('Async error'));\n         *\n         *  await asyncMock(); // first call\n         *  await asyncMock(); // throws \"Async error\"\n         * });\n         *\n         */\n        mockRejectedValueOnce(value: RejectedValue<T>): Mock<T, Y>;\n    }\n\n    /**\n     * Represents the result of a single call to a mock function with a return value.\n     */\n    interface MockResultReturn<T> {\n        type: 'return';\n        value: T;\n    }\n    /**\n     * Represents the result of a single incomplete call to a mock function.\n     */\n    interface MockResultIncomplete {\n        type: 'incomplete';\n        value: undefined;\n    }\n    /**\n     * Represents the result of a single call to a mock function with a thrown error.\n     */\n    interface MockResultThrow {\n        type: 'throw';\n        value: any;\n    }\n\n    type MockResult<T> = MockResultReturn<T> | MockResultThrow | MockResultIncomplete;\n\n    interface MockContext<T, Y extends any[]> {\n        calls: Y[];\n        instances: T[];\n        invocationCallOrder: number[];\n        /**\n         * List of results of calls to the mock function.\n         */\n        results: Array<MockResult<T>>;\n    }\n}\n\n// Jest ships with a copy of Jasmine. They monkey-patch its APIs and divergence/deprecation are expected.\n// Relevant parts of Jasmine's API are below so they can be changed and removed over time.\n// This file can't reference jasmine.d.ts since the globals aren't compatible.\n\ndeclare function spyOn<T>(object: T, method: keyof T): jasmine.Spy;\n/**\n * If you call the function pending anywhere in the spec body,\n * no matter the expectations, the spec will be marked pending.\n */\ndeclare function pending(reason?: string): void;\n/**\n * Fails a test when called within one.\n */\ndeclare function fail(error?: any): never;\ndeclare namespace jasmine {\n    let DEFAULT_TIMEOUT_INTERVAL: number;\n    function clock(): Clock;\n    function any(aclass: any): Any;\n    function anything(): Any;\n    function arrayContaining(sample: any[]): ArrayContaining;\n    function objectContaining(sample: any): ObjectContaining;\n    function createSpy(name?: string, originalFn?: (...args: any[]) => any): Spy;\n    function createSpyObj(baseName: string, methodNames: any[]): any;\n    function createSpyObj<T>(baseName: string, methodNames: any[]): T;\n    function pp(value: any): string;\n    function addCustomEqualityTester(equalityTester: CustomEqualityTester): void;\n    function addMatchers(matchers: CustomMatcherFactories): void;\n    function stringMatching(value: string | RegExp): Any;\n\n    interface Clock {\n        install(): void;\n        uninstall(): void;\n        /**\n         * Calls to any registered callback are triggered when the clock isticked forward\n         * via the jasmine.clock().tick function, which takes a number of milliseconds.\n         */\n        tick(ms: number): void;\n        mockDate(date?: Date): void;\n    }\n\n    interface Any {\n        new (expectedClass: any): any;\n        jasmineMatches(other: any): boolean;\n        jasmineToString(): string;\n    }\n\n    interface ArrayContaining {\n        new (sample: any[]): any;\n        asymmetricMatch(other: any): boolean;\n        jasmineToString(): string;\n    }\n\n    interface ObjectContaining {\n        new (sample: any): any;\n        jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean;\n        jasmineToString(): string;\n    }\n\n    interface Spy {\n        (...params: any[]): any;\n        identity: string;\n        and: SpyAnd;\n        calls: Calls;\n        mostRecentCall: { args: any[]; };\n        argsForCall: any[];\n        wasCalled: boolean;\n    }\n\n    interface SpyAnd {\n        /**\n         * By chaining the spy with and.callThrough, the spy will still track all\n         * calls to it but in addition it will delegate to the actual implementation.\n         */\n        callThrough(): Spy;\n        /**\n         * By chaining the spy with and.returnValue, all calls to the function\n         * will return a specific value.\n         */\n        returnValue(val: any): Spy;\n        /**\n         * By chaining the spy with and.returnValues, all calls to the function\n         * will return specific values in order until it reaches the end of the return values list.\n         */\n        returnValues(...values: any[]): Spy;\n        /**\n         * By chaining the spy with and.callFake, all calls to the spy\n         * will delegate to the supplied function.\n         */\n        callFake(fn: (...args: any[]) => any): Spy;\n        /**\n         * By chaining the spy with and.throwError, all calls to the spy\n         * will throw the specified value.\n         */\n        throwError(msg: string): Spy;\n        /**\n         * When a calling strategy is used for a spy, the original stubbing\n         * behavior can be returned at any time with and.stub.\n         */\n        stub(): Spy;\n    }\n\n    interface Calls {\n        /**\n         * By chaining the spy with calls.any(),\n         * will return false if the spy has not been called at all,\n         * and then true once at least one call happens.\n         */\n        any(): boolean;\n        /**\n         * By chaining the spy with calls.count(),\n         * will return the number of times the spy was called\n         */\n        count(): number;\n        /**\n         * By chaining the spy with calls.argsFor(),\n         * will return the arguments passed to call number index\n         */\n        argsFor(index: number): any[];\n        /**\n         * By chaining the spy with calls.allArgs(),\n         * will return the arguments to all calls\n         */\n        allArgs(): any[];\n        /**\n         * By chaining the spy with calls.all(), will return the\n         * context (the this) and arguments passed all calls\n         */\n        all(): CallInfo[];\n        /**\n         * By chaining the spy with calls.mostRecent(), will return the\n         * context (the this) and arguments for the most recent call\n         */\n        mostRecent(): CallInfo;\n        /**\n         * By chaining the spy with calls.first(), will return the\n         * context (the this) and arguments for the first call\n         */\n        first(): CallInfo;\n        /**\n         * By chaining the spy with calls.reset(), will clears all tracking for a spy\n         */\n        reset(): void;\n    }\n\n    interface CallInfo {\n        /**\n         * The context (the this) for the call\n         */\n        object: any;\n        /**\n         * All arguments passed to the call\n         */\n        args: any[];\n        /**\n         * The return value of the call\n         */\n        returnValue: any;\n    }\n\n    interface CustomMatcherFactories {\n        [index: string]: CustomMatcherFactory;\n    }\n\n    type CustomMatcherFactory = (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]) => CustomMatcher;\n\n    interface MatchersUtil {\n        equals(a: any, b: any, customTesters?: CustomEqualityTester[]): boolean;\n        contains<T>(haystack: ArrayLike<T> | string, needle: any, customTesters?: CustomEqualityTester[]): boolean;\n        buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: any[]): string;\n    }\n\n    type CustomEqualityTester = (first: any, second: any) => boolean;\n\n    interface CustomMatcher {\n        compare<T>(actual: T, expected: T, ...args: any[]): CustomMatcherResult;\n        compare(actual: any, ...expected: any[]): CustomMatcherResult;\n    }\n\n    interface CustomMatcherResult {\n        pass: boolean;\n        message: string | (() => string);\n    }\n\n    interface ArrayLike<T> {\n        length: number;\n        [n: number]: T;\n    }\n}\n\ndeclare namespace jest {\n    // types for implementing custom interfaces, from https://github.com/facebook/jest/tree/dd6c5c4/types\n\n    // https://facebook.github.io/jest/docs/en/configuration.html#transform-object-string-string\n    // const transformer: Transformer;\n\n    // https://facebook.github.io/jest/docs/en/configuration.html#reporters-array-modulename-modulename-options\n    // const reporter: Reporter;\n\n    // https://facebook.github.io/jest/docs/en/configuration.html#testrunner-string\n    // const testRunner: TestFramework;\n\n    // https://facebook.github.io/jest/docs/en/configuration.html#testresultsprocessor-string\n    // const testResultsProcessor: TestResultsProcessor;\n\n    // leave above declarations for referening type-dependencies\n    // .vscode/settings.json: \"typescript.referencesCodeLens.enabled\": true\n\n    // custom\n\n    // flow's Maybe type https://flow.org/en/docs/types/primitives/#toc-maybe-types\n    type Maybe<T> = void | null | undefined | T; // tslint:disable-line:void-return\n\n    type TestResultsProcessor = (testResult: AggregatedResult) => AggregatedResult;\n\n    type HasteResolver = any; // import HasteResolver from 'jest-resolve';\n    type ModuleMocker = any; // import { ModuleMocker } from 'jest-mock';\n    type ModuleMap = any; // import {ModuleMap} from 'jest-haste-map';\n    type HasteFS = any; // import {FS as HasteFS} from 'jest-haste-map';\n    type Runtime = any; // import Runtime from 'jest-runtime';\n    type Script = any; // import {Script} from 'vm';\n\n    // Config\n\n    type Path = string;\n    type Glob = string;\n\n    interface HasteConfig {\n        defaultPlatform?: Maybe<string>;\n        hasteImplModulePath?: string;\n        platforms?: string[];\n        providesModuleNodeModules: string[];\n    }\n\n    type ReporterConfig = [string, object];\n\n    type ConfigGlobals = object;\n\n    type SnapshotUpdateState = 'all' | 'new' | 'none';\n\n    interface DefaultOptions {\n        automock: boolean;\n        bail: boolean;\n        browser: boolean;\n        cache: boolean;\n        cacheDirectory: Path;\n        changedFilesWithAncestor: boolean;\n        clearMocks: boolean;\n        collectCoverage: boolean;\n        collectCoverageFrom: Maybe<string[]>;\n        coverageDirectory: Maybe<string>;\n        coveragePathIgnorePatterns: string[];\n        coverageReporters: string[];\n        coverageThreshold: Maybe<{global: {[key: string]: number}}>;\n        errorOnDeprecated: boolean;\n        expand: boolean;\n        filter: Maybe<Path>;\n        forceCoverageMatch: Glob[];\n        globals: ConfigGlobals;\n        globalSetup: Maybe<string>;\n        globalTeardown: Maybe<string>;\n        haste: HasteConfig;\n        detectLeaks: boolean;\n        detectOpenHandles: boolean;\n        moduleDirectories: string[];\n        moduleFileExtensions: string[];\n        moduleNameMapper: {[key: string]: string};\n        modulePathIgnorePatterns: string[];\n        noStackTrace: boolean;\n        notify: boolean;\n        notifyMode: string;\n        preset: Maybe<string>;\n        projects: Maybe<Array<string | ProjectConfig>>;\n        resetMocks: boolean;\n        resetModules: boolean;\n        resolver: Maybe<Path>;\n        restoreMocks: boolean;\n        rootDir: Maybe<Path>;\n        roots: Maybe<Path[]>;\n        runner: string;\n        runTestsByPath: boolean;\n        setupFiles: Path[];\n        setupTestFrameworkScriptFile: Maybe<Path>;\n        skipFilter: boolean;\n        snapshotSerializers: Path[];\n        testEnvironment: string;\n        testEnvironmentOptions: object;\n        testFailureExitCode: string | number;\n        testLocationInResults: boolean;\n        testMatch: Glob[];\n        testPathIgnorePatterns: string[];\n        testRegex: string;\n        testResultsProcessor: Maybe<string>;\n        testRunner: Maybe<string>;\n        testURL: string;\n        timers: 'real' | 'fake';\n        transform: Maybe<{[key: string]: string}>;\n        transformIgnorePatterns: Glob[];\n        watchPathIgnorePatterns: string[];\n        useStderr: boolean;\n        verbose: Maybe<boolean>;\n        watch: boolean;\n        watchman: boolean;\n    }\n\n    interface InitialOptions {\n        automock?: boolean;\n        bail?: boolean;\n        browser?: boolean;\n        cache?: boolean;\n        cacheDirectory?: Path;\n        clearMocks?: boolean;\n        changedFilesWithAncestor?: boolean;\n        changedSince?: string;\n        collectCoverage?: boolean;\n        collectCoverageFrom?: Glob[];\n        collectCoverageOnlyFrom?: {[key: string]: boolean};\n        coverageDirectory?: string;\n        coveragePathIgnorePatterns?: string[];\n        coverageReporters?: string[];\n        coverageThreshold?: {global: {[key: string]: number}};\n        detectLeaks?: boolean;\n        detectOpenHandles?: boolean;\n        displayName?: string;\n        expand?: boolean;\n        filter?: Path;\n        findRelatedTests?: boolean;\n        forceCoverageMatch?: Glob[];\n        forceExit?: boolean;\n        json?: boolean;\n        globals?: ConfigGlobals;\n        globalSetup?: Maybe<string>;\n        globalTeardown?: Maybe<string>;\n        haste?: HasteConfig;\n        reporters?: Array<ReporterConfig | string>;\n        logHeapUsage?: boolean;\n        lastCommit?: boolean;\n        listTests?: boolean;\n        mapCoverage?: boolean;\n        moduleDirectories?: string[];\n        moduleFileExtensions?: string[];\n        moduleLoader?: Path;\n        moduleNameMapper?: {[key: string]: string};\n        modulePathIgnorePatterns?: string[];\n        modulePaths?: string[];\n        name?: string;\n        noStackTrace?: boolean;\n        notify?: boolean;\n        notifyMode?: string;\n        onlyChanged?: boolean;\n        outputFile?: Path;\n        passWithNoTests?: boolean;\n        preprocessorIgnorePatterns?: Glob[];\n        preset?: Maybe<string>;\n        projects?: Glob[];\n        replname?: Maybe<string>;\n        resetMocks?: boolean;\n        resetModules?: boolean;\n        resolver?: Maybe<Path>;\n        restoreMocks?: boolean;\n        rootDir?: Path;\n        roots?: Path[];\n        runner?: string;\n        runTestsByPath?: boolean;\n        scriptPreprocessor?: string;\n        setupFiles?: Path[];\n        setupTestFrameworkScriptFile?: Path;\n        silent?: boolean;\n        skipFilter?: boolean;\n        skipNodeResolution?: boolean;\n        snapshotSerializers?: Path[];\n        errorOnDeprecated?: boolean;\n        testEnvironment?: string;\n        testEnvironmentOptions?: object;\n        testFailureExitCode?: string | number;\n        testLocationInResults?: boolean;\n        testMatch?: Glob[];\n        testNamePattern?: string;\n        testPathDirs?: Path[];\n        testPathIgnorePatterns?: string[];\n        testRegex?: string;\n        testResultsProcessor?: Maybe<string>;\n        testRunner?: string;\n        testURL?: string;\n        timers?: 'real' | 'fake';\n        transform?: {[key: string]: string};\n        transformIgnorePatterns?: Glob[];\n        watchPathIgnorePatterns?: string[];\n        unmockedModulePathPatterns?: string[];\n        updateSnapshot?: boolean;\n        useStderr?: boolean;\n        verbose?: Maybe<boolean>;\n        watch?: boolean;\n        watchAll?: boolean;\n        watchman?: boolean;\n        watchPlugins?: string[];\n    }\n\n    interface GlobalConfig {\n        bail: boolean;\n        collectCoverage: boolean;\n        collectCoverageFrom: Glob[];\n        collectCoverageOnlyFrom: Maybe<{[key: string]: boolean}>;\n        coverageDirectory: string;\n        coverageReporters: string[];\n        coverageThreshold: {global: {[key: string]: number}};\n        expand: boolean;\n        forceExit: boolean;\n        logHeapUsage: boolean;\n        mapCoverage: boolean;\n        noStackTrace: boolean;\n        notify: boolean;\n        projects: Glob[];\n        replname: Maybe<string>;\n        reporters: ReporterConfig[];\n        rootDir: Path;\n        silent: boolean;\n        testNamePattern: string;\n        testPathPattern: string;\n        testResultsProcessor: Maybe<string>;\n        updateSnapshot: SnapshotUpdateState;\n        useStderr: boolean;\n        verbose: Maybe<boolean>;\n        watch: boolean;\n        watchman: boolean;\n    }\n\n    interface ProjectConfig {\n        automock: boolean;\n        browser: boolean;\n        cache: boolean;\n        cacheDirectory: Path;\n        clearMocks: boolean;\n        coveragePathIgnorePatterns: string[];\n        cwd: Path;\n        detectLeaks: boolean;\n        displayName: Maybe<string>;\n        forceCoverageMatch: Glob[];\n        globals: ConfigGlobals;\n        haste: HasteConfig;\n        moduleDirectories: string[];\n        moduleFileExtensions: string[];\n        moduleLoader: Path;\n        moduleNameMapper: Array<[string, string]>;\n        modulePathIgnorePatterns: string[];\n        modulePaths: string[];\n        name: string;\n        resetMocks: boolean;\n        resetModules: boolean;\n        resolver: Maybe<Path>;\n        rootDir: Path;\n        roots: Path[];\n        runner: string;\n        setupFiles: Path[];\n        setupTestFrameworkScriptFile: Path;\n        skipNodeResolution: boolean;\n        snapshotSerializers: Path[];\n        testEnvironment: string;\n        testEnvironmentOptions: object;\n        testLocationInResults: boolean;\n        testMatch: Glob[];\n        testPathIgnorePatterns: string[];\n        testRegex: string;\n        testRunner: string;\n        testURL: string;\n        timers: 'real' | 'fake';\n        transform: Array<[string, Path]>;\n        transformIgnorePatterns: Glob[];\n        unmockedModulePathPatterns: Maybe<string[]>;\n        watchPathIgnorePatterns: string[];\n    }\n\n    // Console\n\n    type LogMessage = string;\n    interface LogEntry {\n        message: LogMessage;\n        origin: string;\n        type: LogType;\n    }\n    type LogType = 'log' | 'info' | 'warn' | 'error';\n    type ConsoleBuffer = LogEntry[];\n\n    // Context\n\n    interface Context {\n        config: ProjectConfig;\n        hasteFS: HasteFS;\n        moduleMap: ModuleMap;\n        resolver: HasteResolver;\n    }\n\n    // Environment\n\n    interface FakeTimers {\n        clearAllTimers(): void;\n        runAllImmediates(): void;\n        runAllTicks(): void;\n        runAllTimers(): void;\n        runTimersToTime(msToRun: number): void;\n        advanceTimersByTime(msToRun: number): void;\n        runOnlyPendingTimers(): void;\n        runWithRealTimers(callback: any): void;\n        useFakeTimers(): void;\n        useRealTimers(): void;\n    }\n\n    interface $JestEnvironment {\n        global: Global;\n        fakeTimers: FakeTimers;\n        testFilePath: string;\n        moduleMocker: ModuleMocker;\n\n        dispose(): void;\n        runScript(script: Script): any;\n    }\n\n    type Environment = $JestEnvironment;\n\n    // Global\n\n    type Global = object;\n\n    // Reporter\n\n    interface ReporterOnStartOptions {\n        estimatedTime: number;\n        showStatus: boolean;\n    }\n\n    // TestResult\n\n    interface RawFileCoverage {\n        path: string;\n        s: {[statementId: number]: number};\n        b: {[branchId: number]: number};\n        f: {[functionId: number]: number};\n        l: {[lineId: number]: number};\n        fnMap: {[functionId: number]: any};\n        statementMap: {[statementId: number]: any};\n        branchMap: {[branchId: number]: any};\n        inputSourceMap?: object;\n    }\n\n    interface RawCoverage {\n        [filePath: string]: RawFileCoverage;\n    }\n\n    interface FileCoverageTotal {\n        total: number;\n        covered: number;\n        skipped: number;\n        pct?: number;\n    }\n\n    interface CoverageSummary {\n        lines: FileCoverageTotal;\n        statements: FileCoverageTotal;\n        branches: FileCoverageTotal;\n        functions: FileCoverageTotal;\n    }\n\n    interface FileCoverage {\n        getLineCoverage(): object;\n        getUncoveredLines(): number[];\n        getBranchCoverageByLine(): object;\n        toJSON(): object;\n        merge(other: object): void;\n        computeSimpleTotals(property: string): FileCoverageTotal;\n        computeBranchTotals(): FileCoverageTotal;\n        resetHits(): void;\n        toSummary(): CoverageSummary;\n    }\n\n    interface CoverageMap {\n        merge(data: object): void;\n        getCoverageSummary(): FileCoverage;\n        data: RawCoverage;\n        addFileCoverage(fileCoverage: RawFileCoverage): void;\n        files(): string[];\n        fileCoverageFor(file: string): FileCoverage;\n    }\n\n    interface SerializableError {\n        code?: any;\n        message: string;\n        stack: Maybe<string>;\n        type?: string;\n    }\n\n    type Status = 'passed' | 'failed' | 'skipped' | 'pending';\n\n    type Bytes = number;\n    type Milliseconds = number;\n\n    interface AssertionResult {\n        ancestorTitles: string[];\n        duration?: Maybe<Milliseconds>;\n        failureMessages: string[];\n        fullName: string;\n        numPassingAsserts: number;\n        status: Status;\n        title: string;\n    }\n\n    interface AggregatedResult {\n        coverageMap?: Maybe<CoverageMap>;\n        numFailedTests: number;\n        numFailedTestSuites: number;\n        numPassedTests: number;\n        numPassedTestSuites: number;\n        numPendingTests: number;\n        numPendingTestSuites: number;\n        numRuntimeErrorTestSuites: number;\n        numTotalTests: number;\n        numTotalTestSuites: number;\n        snapshot: SnapshotSummary;\n        startTime: number;\n        success: boolean;\n        testResults: TestResult[];\n        wasInterrupted: boolean;\n    }\n\n    interface TestResult {\n        console: Maybe<ConsoleBuffer>;\n        coverage?: RawCoverage;\n        memoryUsage?: Bytes;\n        failureMessage: Maybe<string>;\n        numFailingTests: number;\n        numPassingTests: number;\n        numPendingTests: number;\n        perfStats: {\n            end: Milliseconds,\n            start: Milliseconds,\n        };\n        skipped: boolean;\n        snapshot: {\n            added: number,\n            fileDeleted: boolean,\n            matched: number,\n            unchecked: number,\n            unmatched: number,\n            updated: number,\n        };\n        sourceMaps: {[sourcePath: string]: string};\n        testExecError?: SerializableError;\n        testFilePath: string;\n        testResults: AssertionResult[];\n    }\n\n    interface SnapshotSummary {\n        added: number;\n        didUpdate: boolean;\n        failure: boolean;\n        filesAdded: number;\n        filesRemoved: number;\n        filesUnmatched: number;\n        filesUpdated: number;\n        matched: number;\n        total: number;\n        unchecked: number;\n        unmatched: number;\n        updated: number;\n    }\n\n    // TestRunner\n\n    interface Test {\n        context: Context;\n        duration?: number;\n        path: Path;\n    }\n\n    // tslint:disable-next-line:no-empty-interface\n    interface Set<T> {} // To allow non-ES6 users the Set below\n    interface Reporter {\n        onTestResult?(test: Test, testResult: TestResult, aggregatedResult: AggregatedResult): void;\n        onRunStart?(results: AggregatedResult, options: ReporterOnStartOptions): void;\n        onTestStart?(test: Test): void;\n        onRunComplete?(contexts: Set<Context>, results: AggregatedResult): Maybe<Promise<void>>;\n        getLastError?(): Maybe<Error>;\n    }\n\n    type TestFramework = (\n        globalConfig: GlobalConfig,\n        config: ProjectConfig,\n        environment: Environment,\n        runtime: Runtime,\n        testPath: string,\n    ) => Promise<TestResult>;\n\n    // Transform\n\n    interface TransformedSource {\n        code: string;\n        map: Maybe<object | string>;\n    }\n\n    interface TransformOptions {\n        instrument: boolean;\n    }\n\n    interface Transformer {\n        canInstrument?: boolean;\n        createTransformer?(options: any): Transformer;\n\n        getCacheKey?(\n            fileData: string,\n            filePath: Path,\n            configStr: string,\n            options: TransformOptions,\n        ): string;\n\n        process(\n            sourceText: string,\n            sourcePath: Path,\n            config: ProjectConfig,\n            options?: TransformOptions,\n        ): string | TransformedSource;\n    }\n}\n",
    "scriptKindName": "TS",
    "projectRootPath": "/Users/brunoscopelliti/Desktop/***********"
}
[Trace  - 7:59:34 AM] Sending request: close (54). Response expected: no. Current queue length: 0
Arguments: {
    "file": "/Users/brunoscopelliti/Library/Caches/typescript/3.3/node_modules/@types/jest/index.d.ts"
}
[Trace  - 7:59:34 AM] Event received: projectLoadingStart (0).
Data: {
    "projectName": "/Users/brunoscopelliti/tsconfig.json",
    "reason": "Creating possible configured project for /Users/brunoscopelliti/Library/Caches/typescript/3.3/node_modules/@types/jest/index.d.ts to open"
}
[Trace  - 7:59:34 AM] Sending request: change (55). Response expected: no. Current queue length: 0
Arguments: {
    "insertString": "smallWorld",
    "file": "[**********************]/tests/index.js",
    "line": 133,
    "offset": 10,
    "endLine": 133,
    "endOffset": 10
}
[Trace  - 7:59:34 AM] Sending request: getOutliningSpans (56). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "[**********************]/tests/index.js"
}
[Trace  - 7:59:44 AM] TypeScript Server: trying to cancel ongoing request with sequence number 56
[Trace  - 7:59:44 AM] TypeScript Server: canceled request with sequence number 57

Hope it helps.

@nburnesy
Copy link

nburnesy commented Mar 4, 2019

After burning hours on this issue, I found cloning my repo into a different folder and opening it there solved the problem.

@brunoscopelliti
Copy link
Author

@nburnesy I can give a try, but I've reproduced this issue on different independent repos, and also on a workspace project. I still replicate this issue multiple times a day. @7cc 's suggestion helped a bit, but I look forward for this issue to be definetely solved.

@alirezaimi
Copy link

same for me :( 1.31.1

@ojde
Copy link

ojde commented Mar 6, 2019

Always reproducable with freshly installed 1.31.1 in clean Windows 7 Pro 64:

Open a file from network location \\server\path_on_server\file.js
"Initializing JS/TS language features" runs blinking (starts/stops/starts/...?) forever (even if file is closed later)

Does not occur on opening same file on local drive (C:\file.js) or mapped drive S:\path_on_server\file.js

Further observations:
If local file.js is loaded first, "Initializing JS/TS language features" starts and completes.
If the network file.js is then opend additionally, same behaviour: starts/stops/starts/stops/starts/...

@alirezaimi
Copy link

@ojde same for me with this conditions . on local there is no problem but on network drive this message blinking forever !

@brunoscopelliti
Copy link
Author

I can reproduce this issue on local repos as well.

@jrlang002
Copy link

I am running the nightly VS Code build with no external plugins and am seeing this issue on macOS Mojave Version 10.14.3. It has been an issue since late 2018 and it has gotten to the point where I have to use a different IDE. Very sad day because VS Code is my favorite editor of all time. Just unusable at the moment for my javascript purposes. I am subscribing to this thread because I would like to switch back to VS Code when this is resolved.

@brunoscopelliti
Copy link
Author

@jrlang002 Have you read this comment #68896 (comment)? This didn't fix the issue, but reduced the pain, at least for me. I can understand your frustation; vscode is my favourite editor as well... and like you, I switched back to sublime for a short period.

@brunoscopelliti
Copy link
Author

... Also it would be nice to have any updates about the state of this issue. Thank you.

@mjbvz mjbvz removed the info-needed Issue requires more information from poster label Mar 11, 2019
@mjbvz mjbvz added this to the March 2019 milestone Mar 11, 2019
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Mar 11, 2019
@mjbvz mjbvz closed this as completed in 05efab0 Mar 11, 2019
@VadimGorbenko
Copy link

@octref Yes, same in insiders build

@octref
Copy link
Contributor

octref commented Mar 28, 2019

@VadimGorbenko How are you openining //%MyProjectRemotePath%/, are you using any extension? Can you post a setup to help us repro the issue?

@octref octref modified the milestones: March 2019, April 2019 Mar 28, 2019
@octref octref removed the verification-steps-needed Steps to verify are needed for verification label Mar 28, 2019
@octref
Copy link
Contributor

octref commented Mar 28, 2019

Not sure this can be verified, and people seem to still have problems, so reopening and moving to April.

@sh67
Copy link

sh67 commented Mar 28, 2019

I tried the latest Insider's build you linked to above @octref and I'm still experiencing the same problem. (Although, the link appears to be currently pointing to a different commit.)
I also want to mention that I'm doing something very similar to what it appears @VadimGorbenko is doing. That is, I'm opening a file from a SharePoint SiteAssets library. In my case, I navigate to the library in the browser and click the 'Open in Explorer' button in the ribbon. With that Explorer window open, I drag the file onto the open VSCode window. I have no extensions enabled, and I'm running the no-install version.

Version: 1.33.0-insider
Commit: f5044f0
Date: 2019-03-28T16:25:05.937Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.14393

The output I get seems to indicate VSCode is attempting to access the config file in a location inaccessible to me.


[Trace  - 3:08:20 PM] Event received: semanticDiag (0).
Data: {
    "file": "//sharepointserver.mycompany.com/DavWWWRoot/sites/divisionsite/subsite1/subsite2/subsite3/SiteAssets/myfile.js",
    "diagnostics": []
}
[Trace  - 3:08:20 PM] Event received: suggestionDiag (0).
Data: {
    "file": "//sharepointserver.mycompany.com/DavWWWRoot/sites/divisionsite/subsite1/subsite2/subsite3/SiteAssets/myfile.js",
    "diagnostics": []
}
[Trace  - 3:08:20 PM] Async response received: requestCompleted (177). Request took 5 ms.
[Trace  - 3:08:20 PM] Sending request: getApplicableRefactors (178). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "//sharepointserver.mycompany.com/DavWWWRoot/sites/divisionsite/subsite1/subsite2/subsite3/SiteAssets/myfile.js",
    "startLine": 1,
    "startOffset": 1,
    "endLine": 1,
    "endOffset": 1
}
[Trace  - 3:08:20 PM] Response received: getApplicableRefactors (178). Request took 1 ms. Success: true 
Result: []
[Trace  - 3:08:22 PM] Event received: projectLoadingStart (0).
Data: {
    "projectName": "//sharepointserver.mycompany.com/jsconfig.json",
    "reason": "Change in config file detected"
}
[Trace  - 3:08:22 PM] Event received: projectLoadingStart (0).
Data: {
    "projectName": "//sharepointserver.mycompany.com/tsconfig.json",
    "reason": "Change in config file detected"
}
[Trace  - 3:08:22 PM] Event received: projectsUpdatedInBackground (0).
Data: {
    "openFiles": [
        "//sharepointserver.mycompany.com/DavWWWRoot/sites/divisionsite/subsite1/subsite2/subsite3/SiteAssets/myfile.js"
    ]
}
[Trace  - 3:08:22 PM] Sending request: geterr (179). Response expected: yes. Current queue length: 0
Arguments: {
    "delay": 0,
    "files": [
        "//sharepointserver.mycompany.com/DavWWWRoot/sites/divisionsite/subsite1/subsite2/subsite3/SiteAssets/myfile.js"
    ]
}
[Trace  - 3:08:22 PM] Event received: syntaxDiag (0).
Data: {
    "file": "//sharepointserver.mycompany.com/DavWWWRoot/sites/divisionsite/subsite1/subsite2/subsite3/SiteAssets/myfile.js",
    "diagnostics": [
        {

@octref octref reopened this Mar 28, 2019
@VadimGorbenko
Copy link

VadimGorbenko commented Mar 29, 2019

@octref ye, my case absolutely the same as sh67 have. With one little difference. I dont drag files into vscode window. I just open whole folder with "Open folder" function and paste path to this library.

Node -v : 8.10.0
Windows 7 pro.

@arthurfanti
Copy link

I removed the jsconfig.json file from my project, and apparently it worked for me.

@ecanem
Copy link

ecanem commented Apr 4, 2019

I am the same as @sh67 I am opening a SiteAssets folder using a mapped drive and it's causing 100% usage. I am using open workspace instead of solder.

@tiagocpontesp
Copy link

same. on all recent (couple of months?) normal and insider builds.

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 6, 2019

Sounds like the remaining issues are for windows network drives. I can't repo this when using a drive mapped to localhost, or a simple mapped from sharepoint either (although I do see a slowdown as you'd expect in this case)

For people still hitting this:

  • Does intellisense work when you see the spinner?
  • Do you have a jsconfig in your workspace?
  • How many files are in your workspace?
  • Can you share the folder you are opening?

@sh67
Copy link

sh67 commented Apr 8, 2019

@mjbvz I'll try to answer your questions for my case, and I want to add a couple of points I discovered this morning.

  • I'm not sure. The spinner is shown for only about a second, then disappears for a few seconds, then reappears for a second, and so on.
  • No
  • 26
  • No

If I actually map the folder (SiteAssets for me) to a Windows drive letter, like Z:, and then drag the file from the Windows Explorer window onto the open VSCode window, I do not encounter the problem.

If I use the 'Open folder ...' command from the 'File' menu in VSCode to open the folder, even without the drive letter mapping in place, and then click on the file in the VSCode Explorer pane, I do not encounter the problem.

I'm still using the same build as the one I referred to in my original reply.
Version: 1.33.0-insider
Commit: f5044f0
Date: 2019-03-28T16:25:05.937Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.14393

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 8, 2019

@sh67 Thanks. I can repo when opening a non-mapped file on a path like \\microsoft.sharepoint.com@SSL\path\file

After investigating, this looks like a real upstream issue that the spinner helped identify. I've opened #30818 to track this upstream

@mjbvz mjbvz closed this as completed Apr 8, 2019
@mjbvz mjbvz modified the milestones: April 2019, Backlog Apr 8, 2019
@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) typescript Typescript support issues labels Apr 8, 2019
@joshuaiz
Copy link

Seeing this behavior on macOS Version 1.33.0 (1.33.0). Just trying to open my scripts.js file in a WordPress theme and Code is bugging out. It's not even a big file.

No node_modules, large json or anything that should be giving Code trouble. I can't even work as it is blowing out my CPU over 100%.

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 10, 2019

@joshuaiz Please open a new issue

@medikoo
Copy link

medikoo commented Apr 11, 2019

Same on my side macOS Version 1.33.0

As a side note, it'll be great if VS Code would provide clear separation of TS from JS e.g. I'm totally not interested in TS integration (would love to have that off) and returning bugs (related to TS support) make me ineffective with VS Code.

@Inveth
Copy link

Inveth commented Apr 24, 2019

Still having this problem.

@jacobweber
Copy link

Still getting this constantly. I already opened #71109 and had it closed as a duplicate.

@microsoft microsoft locked as resolved and limited conversation to collaborators Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests