Skip to content

Template is outdated. Cannot find namespace 'ts'. #7

Open
@ThePlenkov

Description

@ThePlenkov

Hi!

I tried to clone your project and increase ts version to the latest.

Here is what I have after this:

[{
	"resource": "/workspaces/TypeScript-TSServer-Plugin-Template/src/index.ts",
	"owner": "typescript",
	"code": "2503",
	"severity": 8,
	"message": "Cannot find namespace 'ts'.",
	"source": "ts",
	"startLineNumber": 4,
	"startColumn": 27,
	"endLineNumber": 4,
	"endColumn": 29
},{
	"resource": "/workspaces/TypeScript-TSServer-Plugin-Template/src/index.ts",
	"owner": "typescript",
	"code": "2503",
	"severity": 8,
	"message": "Cannot find namespace 'ts'.",
	"source": "ts",
	"startLineNumber": 15,
	"startColumn": 20,
	"endLineNumber": 15,
	"endColumn": 22
},{
	"resource": "/workspaces/TypeScript-TSServer-Plugin-Template/src/index.ts",
	"owner": "typescript",
	"code": "2503",
	"severity": 8,
	"message": "Cannot find namespace 'ts'.",
	"source": "ts",
	"startLineNumber": 16,
	"startColumn": 70,
	"endLineNumber": 16,
	"endColumn": 72
},{
	"resource": "/workspaces/TypeScript-TSServer-Plugin-Template/src/index.ts",
	"owner": "typescript",
	"code": "2578",
	"severity": 8,
	"message": "Unused '@ts-expect-error' directive.",
	"source": "ts",
	"startLineNumber": 18,
	"startColumn": 9,
	"endLineNumber": 18,
	"endColumn": 82
},{
	"resource": "/workspaces/TypeScript-TSServer-Plugin-Template/src/index.ts",
	"owner": "typescript",
	"code": "7006",
	"severity": 8,
	"message": "Parameter 'fileName' implicitly has an 'any' type.",
	"source": "ts",
	"startLineNumber": 23,
	"startColumn": 41,
	"endLineNumber": 23,
	"endColumn": 49
},{
	"resource": "/workspaces/TypeScript-TSServer-Plugin-Template/src/index.ts",
	"owner": "typescript",
	"code": "7006",
	"severity": 8,
	"message": "Parameter 'position' implicitly has an 'any' type.",
	"source": "ts",
	"startLineNumber": 23,
	"startColumn": 51,
	"endLineNumber": 23,
	"endColumn": 59
},{
	"resource": "/workspaces/TypeScript-TSServer-Plugin-Template/src/index.ts",
	"owner": "typescript",
	"code": "7006",
	"severity": 8,
	"message": "Parameter 'options' implicitly has an 'any' type.",
	"source": "ts",
	"startLineNumber": 23,
	"startColumn": 61,
	"endLineNumber": 23,
	"endColumn": 68
},{
	"resource": "/workspaces/TypeScript-TSServer-Plugin-Template/src/index.ts",
	"owner": "typescript",
	"code": "7006",
	"severity": 8,
	"message": "Parameter 'e' implicitly has an 'any' type.",
	"source": "ts",
	"startLineNumber": 32,
	"startColumn": 46,
	"endLineNumber": 32,
	"endColumn": 47
}]

Could you please update it and a relevant document to support the latest ts version?

Thanks!

Activity

ThePlenkov

ThePlenkov commented on Mar 13, 2025

@ThePlenkov
Author

I've proposed a change. Could you please have a look? thanks!

ChiChou

ChiChou commented on Apr 24, 2025

@ChiChou

There is a workaround that you can replace ts with another dynamic import statement.

e.g.:

function create(info: import("typescript/lib/tsserverlibrary").server.PluginCreateInfo)

Redundant but worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ChiChou@ThePlenkov

        Issue actions

          Template is outdated. Cannot find namespace 'ts'. · Issue #7 · orta/TypeScript-TSServer-Plugin-Template