Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-documenter/-extractor/-model] Support 'abstract' Modifier #3662

Merged
merged 13 commits into from
Jan 25, 2023

Commits on Sep 29, 2022

  1. [api-extractor-model, api-extractor] Support for 'abstract' modifier

    Analogous to other ApiItem mixins, the new ApiAbstractMixin
    adds 'isAbstract' as a property aspect. It is mixed into
    ApiClass and ApiMethod, the only models that may have an
    'abstract' modifier. ApiModelGenerator detects the modifier
    and adds it to the models.
    This change updates all generated *.api.json files to
    include the new "isAbstract" property.
    fwienber committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    43f80c4 View commit details
    Browse the repository at this point in the history
  2. [api-documenter] Add 'abstract' to "Modifiers" column

    Generate "abstract" if an API item has the ApiAbstractMixin
    and 'isAbstract' is true.
    So far, this only works for methods, since the classes
    overview table does not have a "Modifiers" column.
    fwienber committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    b146047 View commit details
    Browse the repository at this point in the history
  3. [api-documenter] Separate "Abstract Classes" overview table

    Split classes into abstract and non-abstract classes
    and add a separate overview table for "Abstract Classes".
    The alternative would be to add a "Modifiers" column to
    the existing "Classes" overview table.
    fwienber committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    66932f6 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2022

  1. [api-extractor-model, api-extractor] Support for 'abstract' modifier …

    …also for ApiProperty
    
    When adding 'abstract' for classes and methods, @zelliott
    mentioned that properties can have this modifier, too.
    Thus, ApiProperty must be extended just like ApiMethod and
    ApiClass, and ApiModelGenerator must extract the 'abstract'
    modifier into the ApiProperty model.
    Expected test results change accordingly.
    fwienber committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    c4c0d53 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/main' into fwienber/support-abst…

    …ract-modifier
    
    # Conflicts:
    #	apps/api-extractor/src/generators/ApiModelGenerator.ts
    fwienber committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    2c272dc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2088fd3 View commit details
    Browse the repository at this point in the history
  4. Add change log entries for new 'isAbstract' field

    The support to track and render 'abstract' modifiers on
    classes, methods, and properties affects api-extractor-model,
    api-extractor, and api-documenter.
    fwienber committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    dc41cb5 View commit details
    Browse the repository at this point in the history
  5. [api-documenter] Change modifier output order to match TypeScript syntax

    Unlike other languages like Java, in TypeScript, the order of
    modifiers is defined strictly. Currently, it looks like api-documenter
    uses alphabetical order, which is not the correct TypeScript modifier
    order. It seems the correct order is
    
    (`public` | `protected` | `private`)? (`static`? | `abstract`?) `override`? `readonly`?
    
    No member can be `static` and `abstract` at the same time, so the
    order of these two does not matter. api-documenter currently only
    uses `protected`, `static`, `abstract` (new in this PR) and `readonly`,
    so `public` (default!), `private` (no API!) and `override` (maybe
    interesting for navigation, but not as a modifier) do not apply.
    
    Added a code comment about the order and moved `readonly` to the
    last position so that the overall modifier output order now matches
    TypeScript syntax.
    fwienber committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    5a7e4db View commit details
    Browse the repository at this point in the history
  6. Regenerate expected test data after updating schemaVersion

     The schema version was updated from 1010 to 1011 in 2088fd3,
     so this changed should be squashed with 2088fd3.
    fwienber committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    c1e886a View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2022

  1. [api-documenter] Add test for an abstract class with abstract method …

    …& property
    
    Add a simple abstract class with an abstract method and an
    abstract property at
    build-tests/api-documenter-tests/src/AbstractClass.ts,
    re-export it in the corresponding index.ts
    and rebuild build-tests/api-documenter-tests.
    The updated report files look good. Especially note the
    "Modifiers" column of both tables in
    api-documenter-test.abstractclass.md
    now containing the "abstract" entry.
    fwienber committed Nov 29, 2022
    Configuration menu
    Copy the full SHA
    0a55655 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2023

  1. Merge remote-tracking branch 'remotes/origin/main' into fwienber/supp…

    …ort-abstract-modifier
    octogonz committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    73cd30e View commit details
    Browse the repository at this point in the history
  2. Update change logs

    octogonz committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    06c94ac View commit details
    Browse the repository at this point in the history
  3. rush build

    octogonz committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    c61ad43 View commit details
    Browse the repository at this point in the history