Log in Sign up
2 Matching Annotations
  1. Nov 2021
  2. github.com github.com
    type has no index signature · Issue #14951 · microsoft/TypeScript
    2
    1. TylerRick 01 Nov 2021
      in Public
      Even if it's const, an object can still have properties added later returning any arbitrary type. Indexing into the object would then have to return any - and that's an implicit any.
      no way to know / can't be sure whether _ javascript: objects: can't be sure what properties may have been added
    2. TylerRick 01 Nov 2021
      in Public
      we have no way to know that the line nameMap[3] = "bob"; isn't somewhere in your program
      TypeScript: index signature good point no way to know / can't be sure whether _
    Visit annotations in context

    Tags

    • TypeScript: index signature
    • no way to know / can't be sure whether _
    • good point
    • javascript: objects: can't be sure what properties may have been added

    Annotators

    • TylerRick

    URL

    github.com/Microsoft/TypeScript/issues/14951
Share:
Group. Only group members will be able to view this annotation.
Only me. No one else will be able to view this annotation.
Hypothes.is
  • About
  • Blog
  • Bioscience
  • Education
  • Jobs
  • Help
  • Contact
  • Terms of Service
  • Privacy Policy