{"action":"opened","issue":{"url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/893","repository_url":"https://api.github.com/repos/TypeStrong/atom-typescript","labels_url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/893/labels{/name}","comments_url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/893/comments","events_url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/893/events","html_url":"https://github.com/TypeStrong/atom-typescript/issues/893","id":142151875,"number":893,"title":"Argument of type 'string is not assignable to parameter of type RegExp","user":{"login":"csmrkid","id":430378,"avatar_url":"https://avatars.githubusercontent.com/u/430378?v=3","gravatar_id":"","url":"https://api.github.com/users/csmrkid","html_url":"https://github.com/csmrkid","followers_url":"https://api.github.com/users/csmrkid/followers","following_url":"https://api.github.com/users/csmrkid/following{/other_user}","gists_url":"https://api.github.com/users/csmrkid/gists{/gist_id}","starred_url":"https://api.github.com/users/csmrkid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csmrkid/subscriptions","organizations_url":"https://api.github.com/users/csmrkid/orgs","repos_url":"https://api.github.com/users/csmrkid/repos","events_url":"https://api.github.com/users/csmrkid/events{/privacy}","received_events_url":"https://api.github.com/users/csmrkid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-20T11:06:46Z","updated_at":"2016-03-20T11:06:46Z","closed_at":null,"body":"Dear developers,\r\n\r\nHere is my code\r\n`public test(url: string, pageSize: number, pageNumber: number, columnName: string, direction: string, term: string): Observable<ResponseData<T[]>> {`\r\n`return this.http.get(this.getUrl(url)`\r\n`    .replace('{columnName}', columnName)`\r\n`    .replace('{pageSize}', pageSize)` **<-----error**\r\n`     .replace('{pageNumber}', pageNumber)`\r\n`     .replace('{direction}', direction)`\r\n`     .replace('{term}', term)`\r\n`     , this.restApioptions`\r\n`     ).map(res => <ResponseData<T[]>>res.json())`\r\n`    .catch(this.logger.log);`\r\n`}`\r\n\r\n`public getUrl(url:string):string{`\r\n    `return this.TargetUrl+url;`\r\n ` }`\r\nThere is a error message 'Argument of type 'string is not assignable to parameter of type RegExp'. However, no matter what I put at **<--error** spot, it will show the same error. \r\nIf I replace calling **this.getUrl(url)** to a pure string like **\"xx\".replace(....**  then the error will be gone.\r\nI have no idea why this happened, because the **getURL()** will return a string anyway. I found no error in my compiler console and the script runs without any error."}}