Skip to content

Require Typescript Declaration file #40

@praveenrejeti

Description

@praveenrejeti

Am using typescript extensively, require d.ts file

Created one on my own but was unable to add the methods, can anyone share the d.ts having methods, here is my d.ts file

declare module "sourcebuster" {
    class sbjs{
        init(prefs:Preferences);
    }


    interface Preferences{
        lifetime?:number
        session_length?:number
        timezone_offset?:number
        campaign_param?:string
        term_param?:string
        content_param?:string
        user_ip?:string
        promocode?:boolean|PromoCode
        typein_attributes?:TypeInAttributes
        domain?:string | Domain
        callback:(data:any)=>void
    }

    interface Domain{
        host:string
    }

    interface TypeInAttributes{
        source:string,
        medium:string
    }

    interface PromoCode{
        max:number,
        min:number
    }
    export = new sbjs();
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions