{"action":"created","issue":{"url":"https://api.github.com/repos/typings/registry/issues/153","repository_url":"https://api.github.com/repos/typings/registry","labels_url":"https://api.github.com/repos/typings/registry/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/typings/registry/issues/153/comments","events_url":"https://api.github.com/repos/typings/registry/issues/153/events","html_url":"https://github.com/typings/registry/pull/153","id":137084764,"number":153,"title":"Adding typings for primus.","user":{"login":"dercodebearer","id":17520091,"avatar_url":"https://avatars.githubusercontent.com/u/17520091?v=3","gravatar_id":"","url":"https://api.github.com/users/dercodebearer","html_url":"https://github.com/dercodebearer","followers_url":"https://api.github.com/users/dercodebearer/followers","following_url":"https://api.github.com/users/dercodebearer/following{/other_user}","gists_url":"https://api.github.com/users/dercodebearer/gists{/gist_id}","starred_url":"https://api.github.com/users/dercodebearer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dercodebearer/subscriptions","organizations_url":"https://api.github.com/users/dercodebearer/orgs","repos_url":"https://api.github.com/users/dercodebearer/repos","events_url":"https://api.github.com/users/dercodebearer/events{/privacy}","received_events_url":"https://api.github.com/users/dercodebearer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-28T19:20:37Z","updated_at":"2016-03-05T21:28:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/typings/registry/pulls/153","html_url":"https://github.com/typings/registry/pull/153","diff_url":"https://github.com/typings/registry/pull/153.diff","patch_url":"https://github.com/typings/registry/pull/153.patch"},"body":"Resolves issue #152 "},"comment":{"url":"https://api.github.com/repos/typings/registry/issues/comments/192744816","html_url":"https://github.com/typings/registry/pull/153#issuecomment-192744816","issue_url":"https://api.github.com/repos/typings/registry/issues/153","id":192744816,"user":{"login":"dercodebearer","id":17520091,"avatar_url":"https://avatars.githubusercontent.com/u/17520091?v=3","gravatar_id":"","url":"https://api.github.com/users/dercodebearer","html_url":"https://github.com/dercodebearer","followers_url":"https://api.github.com/users/dercodebearer/followers","following_url":"https://api.github.com/users/dercodebearer/following{/other_user}","gists_url":"https://api.github.com/users/dercodebearer/gists{/gist_id}","starred_url":"https://api.github.com/users/dercodebearer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dercodebearer/subscriptions","organizations_url":"https://api.github.com/users/dercodebearer/orgs","repos_url":"https://api.github.com/users/dercodebearer/repos","events_url":"https://api.github.com/users/dercodebearer/events{/privacy}","received_events_url":"https://api.github.com/users/dercodebearer/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T21:28:25Z","updated_at":"2016-03-05T21:28:25Z","body":"@blakeembrey Happy to make the change, but here's what I'm noticing. And btw, this might totally be my misunderstanding typescript definitions.\r\n\r\nI changed my file to look like this:\r\n\r\n```\r\ndeclare namespace primus {\r\n  export class Primus {\r\n    socket: Socket;\r\n    static connect(url: string, options?: IPrimusConnectOptions): Primus;\r\n    constructor();\r\n    constructor(server: http.Server, options?: IPrimusOptions);\r\n    library(): void;\r\n    open(): void;\r\n    write(data: any): void;\r\n    on(event: string, cb: (spark: ISpark) => void): void;\r\n    end(): void;\r\n    destroy(): void;\r\n    emits(event: string, parser: (next: any, parser: any) => void): void; // might be better tied to a TSD for https://github.com/primus/emits\r\n    id(cb: (id: any) => void): void;\r\n    createSocket(options?: IPrimusOptions): Socket;\r\n    authorize(req: http.ClientRequest, done: () => void): void;\r\n    forEach(cb: (spark: ISpark, id: string, connections: any) => void): void;\r\n    before(event: string, cb: () => void): void;\r\n    before(event: string, cb: (req: http.ClientRequest, res: http.ServerResponse) => void): void;\r\n    before(event: string, cb: (req: http.ClientRequest, res: http.ServerResponse, next: any) => void): void;\r\n    remove(name: string): void;\r\n    enable(name: string): void;\r\n    disable(name: string): void;\r\n    use(name: string, plugin: Object): void;\r\n    transform(event: string, cb: (packet: any) => void): void;\r\n    transforms(event: string, parser: (packet: any, next: any) => void): void; // might be better tied to a TSD for https://github.com/primus/emits\r\n  }\r\n\r\n  export interface IPrimusOptions {\r\n    authorization?: Function;\r\n    pathname?: string;\r\n    parser?: string;\r\n    transformer?: string;\r\n    plugin?: Object;\r\n    timeout?: number;\r\n    global?: string;\r\n    compression?: boolean;\r\n    origins?: string;\r\n    methods?: string;\r\n    credentials?: boolean;\r\n    maxAge?: string;\r\n    headers?: boolean;\r\n    exposed?: boolean;\r\n    strategy?: any;\r\n  }\r\n\r\n  export interface IPrimusConnectOptions {\r\n    timeout?: number;\r\n    ping?: number;\r\n    pong?: number;\r\n    strategy?: string;\r\n    manual?: boolean;\r\n    websockets?: boolean;\r\n    network?: boolean;\r\n    transport?: any;\r\n    queueSize?: any;\r\n    reconnect?: {\r\n      max?: any;\r\n      min?: number;\r\n      retries?: number;\r\n      factor?: number;\r\n    };\r\n  }\r\n\r\n  export interface ISpark {\r\n    headers: any[];\r\n    address: string;\r\n    query: string;\r\n    id: string;\r\n    request: http.ClientRequest;\r\n\r\n    write(data: any): void;\r\n    end(data?: any, options?: Object): void;\r\n    emits(event: string, parser: (next: any, parser: any) => void): void; // might be better tied to a TSD for https://github.com/primus/emits\r\n    on(event: string, cb: (data: any) => void): void;\r\n  }\r\n}\r\n\r\nexport = primus;\r\n```\r\n\r\nAt which point, all of visual studio code, and typescript begins to complain with this weird, cryptic error:\r\n\r\n\" Exported variable 'primus' has or is using name 'Primus' from external module \"primus\" but cannot be made.\" Was wondering what this error means or what I'm doing wrong. "}}