• Adds meta for a class, property, method or parameter with information of dependencies.

    Parameters

    Returns any

    The new decorator function.

    Example

    import {
    defaultDependencies,
    DependsOn
    } from "@egomobile/documentation"

    @DependsOn({
    // an unique ID of the "remote" app that
    // has a dependency on this class
    app: "id-of-my-app",

    // optional remarks for this app
    remarks: "Changes made by this class will update entities in this app",

    // list of entities that are
    // affected in `app`
    entities: [
    {
    // an unique ID of the entity in `app`
    // like the name of a database table
    // or collection
    key: "tdta_user",

    // optional remarks for this entity
    remarks: "Changes made by this class will update this entity",

    // list of entities that are
    // affected in that entity
    attributes: [
    {
    // an unique ID of the attribute
    // inside the entity in like the name of
    // column
    key: "email",

    // optional remarks for this entity attribute
    remarks: "Changes made by this class will update this attribute",
    },
    ],
    },
    ],
    })
    class MyDocumentedClass {
    // you can also save information
    // about a property
    @DependsOn({ ... })
    public aProp: any

    // you can also save information
    // about a method
    @DependsOn({ ... })
    public aMethod(
    // you can also save information
    // about a method parameter
    @DependsOn({ ... }) aParam: any
    ) {
    // ...
    }
    }

    console.log(
    // by default all information are
    // stored in this module-wide array
    defaultDependencies
    )

Generated using TypeDoc