{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2613","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2613/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2613/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2613/events","html_url":"https://github.com/Microsoft/TypeScript/issues/2613","id":66318966,"number":2613,"title":"Configure compiler less strict [Question]","user":{"login":"timoweiss","id":5221667,"avatar_url":"https://avatars.githubusercontent.com/u/5221667?v=3","gravatar_id":"","url":"https://api.github.com/users/timoweiss","html_url":"https://github.com/timoweiss","followers_url":"https://api.github.com/users/timoweiss/followers","following_url":"https://api.github.com/users/timoweiss/following{/other_user}","gists_url":"https://api.github.com/users/timoweiss/gists{/gist_id}","starred_url":"https://api.github.com/users/timoweiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timoweiss/subscriptions","organizations_url":"https://api.github.com/users/timoweiss/orgs","repos_url":"https://api.github.com/users/timoweiss/repos","events_url":"https://api.github.com/users/timoweiss/events{/privacy}","received_events_url":"https://api.github.com/users/timoweiss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-04T13:16:27Z","updated_at":"2015-04-04T21:21:43Z","closed_at":null,"body":"I'm currently writing a webserver application using hapijs (nodejs). I have a bunch of plugins which I want to write in Typescript. A Hapijs plugin needs a function called `register()` and an attributes function property with a name and version:\r\n\r\n```javascript\r\nregister(server, options, next) {\r\n}\r\nregister.attributes = {\r\n    name: 'plugin',\r\n    version: '0.1.0'\r\n};\r\n```\r\nWhen I want to compile this code, I always get\r\n```\r\nlib/plugins/plugin.ts(2,5): 2300 Duplicate identifier 'register'.\r\nlib/plugins/plugin.ts(8,12): 2300 Duplicate identifier 'register'.\r\n```\r\nI don't know the specs very well but I'm wondering whether it should be allowed or not?\r\nEdit: [hapijs plugin docs](http://hapijs.com/api#plugins)\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/89669232","html_url":"https://github.com/Microsoft/TypeScript/issues/2613#issuecomment-89669232","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2613","id":89669232,"user":{"login":"tarh","id":5991775,"avatar_url":"https://avatars.githubusercontent.com/u/5991775?v=3","gravatar_id":"","url":"https://api.github.com/users/tarh","html_url":"https://github.com/tarh","followers_url":"https://api.github.com/users/tarh/followers","following_url":"https://api.github.com/users/tarh/following{/other_user}","gists_url":"https://api.github.com/users/tarh/gists{/gist_id}","starred_url":"https://api.github.com/users/tarh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarh/subscriptions","organizations_url":"https://api.github.com/users/tarh/orgs","repos_url":"https://api.github.com/users/tarh/repos","events_url":"https://api.github.com/users/tarh/events{/privacy}","received_events_url":"https://api.github.com/users/tarh/received_events","type":"User","site_admin":false},"created_at":"2015-04-04T21:21:43Z","updated_at":"2015-04-04T21:21:43Z","body":"\texport interface IRegister {\r\n\t    (server, options, next): void;\r\n\t    attributes?:any;\r\n\t}\r\n\t\r\n\tclass Plugin {\r\n\t    constructor() {\r\n\t        this.register.attributes = {\r\n\t            name: 'plugin',\r\n\t            version: '0.1.0'\r\n\t        };\r\n\t    }\r\n\t    register:IRegister = (server, options, next) => {\r\n\t        server.bind(this);\r\n\t        this._register(server, options);\r\n\t        next();\r\n\t    };\r\n\t    private _register(server, options) {\r\n\t        // Register\r\n\t        return 'register';\r\n\t    }\r\n\t}\r\n\r\nNext time, think to StackOverflow rather than wanting to change the compiler to the first compile error. ;)"}}