GithubHelp home page GithubHelp logo

Comments (1)

nohehf avatar nohehf commented on June 26, 2024

I can confirm, I experience the same issue:

class A {
    @decorator<T>()
    method() {
        // ...
    }
}

will result in the following tree:

(program [0, 0] - [6, 0]
  (class_declaration [0, 0] - [5, 1]
    name: (type_identifier [0, 6] - [0, 7])
    body: (class_body [0, 8] - [5, 1]
      (ERROR [1, 2] - [4, 3]
        decorator: (decorator [1, 2] - [1, 12]
          (identifier [1, 3] - [1, 12]))
        (property_identifier [1, 12] - [1, 12])
        (type_parameters [1, 12] - [1, 15]
          (type_parameter [1, 13] - [1, 14]
            name: (type_identifier [1, 13] - [1, 14])))
        (ERROR [1, 16] - [2, 10]
          (call_expression [2, 2] - [2, 10]
            function: (identifier [2, 2] - [2, 8])
            arguments: (arguments [2, 8] - [2, 10])))
        (object_pattern [2, 11] - [4, 3]
          (comment [3, 4] - [3, 10]))))))
tree-sitter-errors.ts	   0.33 ms	   173 bytes/ms	(ERROR [1, 2] - [4, 3])

And it works just fine without the generic type argument.

from tree-sitter-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.