Neophobe Plebeian Mumpsimus

    @albanian-xrm/early-bound
    TypeScript icon, indicating that this package has built-in type declarations

    8.0.6 • Public • Published

    AlbanianXrm Early-Bound

    Early Bound Type Augmentation for @types/xrm@8

    First you install the package using one of the following commands:

    yarn add -D @albanian-xrm/early-bound@8
    

    or

    npm install --save-dev @albanian-xrm/early-bound@8
    

    The simplest way to add the typing augmentation is to use a triple-slash directive. For example you can create a global.d.ts in your src folder which contains the following:

    /* src/global.d.ts */
    /// <reference path="../node_modules/@albanian-xrm/early-bound/index.d.ts" />

    The you just define your Early-Bound Model. For example Account.d.ts can be described as follows:

    declare namespace Models {
        interface Account {
            CreditOnHold: Xrm.Page.BooleanAttribute;
            CustomerTypeCode: Xrm.Page.OptionSetAttribute;
            ModifiedBy: Xrm.Page.LookupAttribute;
            ModifiedOn: Xrm.Page.DateAttribute;
            Name: Xrm.Page.StringAttribute;
            NumberOfEmployees: Xrm.Page.NumberAttribute;
        }
    
        namespace Account.Forms {
            interface Account extends Xrm.EarlyBound.Form<"Account"> {
                name: "Name";
                header_ModifiedBy: "ModifiedBy";
                ModifiedBy: "ModifiedBy";
                modifiedon: "ModifiedOn";
            }
        }
    }
    
    declare namespace Xrm.EarlyBound {
        interface Entities {
            Account: Models.Account;
        }
    }

    Install

    npm i @albanian-xrm/early-bound

    DownloadsWeekly Downloads

    122

    Version

    8.0.6

    License

    MIT

    Unpacked Size

    13 kB

    Total Files

    3

    Last publish

    Collaborators

    • albanianxrm