Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TypeError: Cannot read properties of undefined (reading 'length') #61867

Closed as not planned
Labels
Milestone
@ntdiary

Description

@ntdiary

🔎 Search Terms

"constructor"

🕗 Version & Regression Information

⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.8.3#code/MYGwhgzhAECC0G8BQ1oHJgHsB2EAuATgK7B6YFoAUAlItAL5KNa57RjQC802ApgO5waSFhEwheAOhCYA5pTCTRhEmQLUgA

💻 Code

classA{'constructor'(){}}consta=newA()console.log(a.constructor)

🙁 Actual behavior

Open the console and place the cursor on theconstructor in the last line, will throw this error:

🙂 Expected behavior

No error is expected

Additional information about the issue

conststr=nodeasStringLiteralLike;
returnstr.text.length===searchSymbolName.length&&(

Here,str is aTokenObject, it doesn't have atext property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp