{"action":"opened","issue":{"url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/309","repository_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript","labels_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/309/comments","events_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/309/events","html_url":"https://github.com/typed-ember/ember-cli-typescript/issues/309","id":360537609,"node_id":"MDU6SXNzdWUzNjA1Mzc2MDk=","number":309,"title":"[@types/ember bug] - SafeString is not consistent","user":{"login":"nightire","id":1104018,"node_id":"MDQ6VXNlcjExMDQwMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1104018?v=4","gravatar_id":"","url":"https://api.github.com/users/nightire","html_url":"https://github.com/nightire","followers_url":"https://api.github.com/users/nightire/followers","following_url":"https://api.github.com/users/nightire/following{/other_user}","gists_url":"https://api.github.com/users/nightire/gists{/gist_id}","starred_url":"https://api.github.com/users/nightire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nightire/subscriptions","organizations_url":"https://api.github.com/users/nightire/orgs","repos_url":"https://api.github.com/users/nightire/repos","events_url":"https://api.github.com/users/nightire/events{/privacy}","received_events_url":"https://api.github.com/users/nightire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-15T12:53:44Z","updated_at":"2018-09-15T12:53:44Z","closed_at":null,"author_association":"NONE","body":"### Which package(s) does this problem pertain to?\r\n  - [x] @types/ember\r\n  - [x] @types/handlebars\r\n\r\n### What are instructions we can follow to reproduce the issue?\r\n``` typescript\r\nimport EmberObject from '@ember/object';\r\nimport { htmlSafe } from '@ember/string';\r\nimport { SafeString } from 'handlebars';\r\n\r\nclass Foo extends EmberObject {\r\n\r\n  get bar(): SafeString {\r\n\treturn htmlSafe('lorem ipsum...');\r\n  }\r\n\r\n}\r\n```\r\n\r\n### Now about that bug. What did you expect to see?\r\nIt is expected to has no errors.\r\n\r\n### What happened instead?\r\nTypescript will throws an error:\r\n\r\n```\r\nType 'import(\"ember\").Ember.Handlebars.SafeString' is not assignable to type 'Handlebars.SafeString'.\r\n  Property 'toHTML' is missing in type 'SafeString'.\r\n```\r\n\r\n---\r\n\r\nThis is `SafeString` in @types/handlebars:\r\n\r\n``` typescript\r\nexport class SafeString {\r\n    constructor(str: string);\r\n    toString(): string;\r\n    toHTML(): string;\r\n}\r\n```\r\n\r\nAnd this is what `htmlSafe` returns in @types/ember:\r\n\r\n``` typescript\r\nnamespace Handlebars {\r\n\t// ...\r\n    class SafeString {\r\n        constructor(str: string);\r\n        toString(): string;\r\n    }\r\n\t// ...\r\n}\r\n\r\nfunction htmlSafe(str: string): Handlebars.SafeString;\r\n```\r\n\r\nApparently, they are not consistent."}}
{"actor":{"display_login":"nightire"}}