Function jsPropertyAccessor

  • Creates JavaScript property accessor expression.

    If accessed property key is valid JavaScript identifier, then creates a .${key} accessor. Otherwise, creates an accessor like ['${key}'] with key properly quoted.

    Parameters

    • key: string

      Accessed property key.

    • quote: "\"" | "'" | "`" = "'"

      Quote symbol to use.

    Returns string

    Property accessor expression.

Generated using TypeDoc