ts-api-utils - v3.0.0-rc.1
    Preparing search index...

    Function isValidPropertyAccess

    • Determines whether the given text can be used to access a property with a PropertyAccessExpression while preserving the property's name.

      Parameters

      • text: string
      • languageVersion: ScriptTarget = ts.ScriptTarget.Latest

      Returns boolean

      isValidPropertyAccess("abc"); // true
      isValidPropertyAccess("123"); // false