{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/monaco-editor/issues/276","repository_url":"https://api.github.com/repos/Microsoft/monaco-editor","labels_url":"https://api.github.com/repos/Microsoft/monaco-editor/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/monaco-editor/issues/276/comments","events_url":"https://api.github.com/repos/Microsoft/monaco-editor/issues/276/events","html_url":"https://github.com/Microsoft/monaco-editor/issues/276","id":192096861,"node_id":"MDU6SXNzdWUxOTIwOTY4NjE=","number":276,"title":"Trying to use `export` d.ts typings with monaco","user":{"login":"kirjs","id":2545357,"node_id":"MDQ6VXNlcjI1NDUzNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/2545357?v=4","gravatar_id":"","url":"https://api.github.com/users/kirjs","html_url":"https://github.com/kirjs","followers_url":"https://api.github.com/users/kirjs/followers","following_url":"https://api.github.com/users/kirjs/following{/other_user}","gists_url":"https://api.github.com/users/kirjs/gists{/gist_id}","starred_url":"https://api.github.com/users/kirjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirjs/subscriptions","organizations_url":"https://api.github.com/users/kirjs/orgs","repos_url":"https://api.github.com/users/kirjs/repos","events_url":"https://api.github.com/users/kirjs/events{/privacy}","received_events_url":"https://api.github.com/users/kirjs/received_events","type":"User","site_admin":false},"labels":[{"id":431426160,"node_id":"MDU6TGFiZWw0MzE0MjYxNjA=","url":"https://api.github.com/repos/Microsoft/monaco-editor/labels/monaco-typescript","name":"monaco-typescript","color":"c5def5","default":false},{"id":433553304,"node_id":"MDU6TGFiZWw0MzM1NTMzMDQ=","url":"https://api.github.com/repos/Microsoft/monaco-editor/labels/needs-more-info","name":"needs-more-info","color":"E2A1C2","default":false}],"state":"closed","locked":false,"assignee":{"login":"jrieken","id":1794099,"node_id":"MDQ6VXNlcjE3OTQwOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1794099?v=4","gravatar_id":"","url":"https://api.github.com/users/jrieken","html_url":"https://github.com/jrieken","followers_url":"https://api.github.com/users/jrieken/followers","following_url":"https://api.github.com/users/jrieken/following{/other_user}","gists_url":"https://api.github.com/users/jrieken/gists{/gist_id}","starred_url":"https://api.github.com/users/jrieken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrieken/subscriptions","organizations_url":"https://api.github.com/users/jrieken/orgs","repos_url":"https://api.github.com/users/jrieken/repos","events_url":"https://api.github.com/users/jrieken/events{/privacy}","received_events_url":"https://api.github.com/users/jrieken/received_events","type":"User","site_admin":false},"assignees":[{"login":"jrieken","id":1794099,"node_id":"MDQ6VXNlcjE3OTQwOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1794099?v=4","gravatar_id":"","url":"https://api.github.com/users/jrieken","html_url":"https://github.com/jrieken","followers_url":"https://api.github.com/users/jrieken/followers","following_url":"https://api.github.com/users/jrieken/following{/other_user}","gists_url":"https://api.github.com/users/jrieken/gists{/gist_id}","starred_url":"https://api.github.com/users/jrieken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrieken/subscriptions","organizations_url":"https://api.github.com/users/jrieken/orgs","repos_url":"https://api.github.com/users/jrieken/repos","events_url":"https://api.github.com/users/jrieken/events{/privacy}","received_events_url":"https://api.github.com/users/jrieken/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-11-28T19:34:28Z","updated_at":"2018-09-25T07:49:51Z","closed_at":"2018-09-25T07:49:51Z","author_association":"NONE","body":"Hello, I am trying to use monaco in a browser. I want to add a number of existing .d.ts files (angular2 actually) to the project.\r\n\r\nWhat I've tried was: \r\n```TypeScript\r\n const dog = `        \r\nexport class Dog {\r\n  public bark(): string;\r\n}`;\r\nmonaco.languages.typescript.typescriptDefaults.addExtraLib(dog, 'dog.d.ts');            \r\n```\r\nWhen I go to the editor, and try to `import {Dog} from 'dog';` the dog module is not found.\r\n\r\nUsing module types worked for me \r\n```TypeScript\r\nconst dog = `       \r\ndeclare module 'dog' {\r\n  export class Dog {\r\n    public bark(): string;\r\n  }\r\n}`;\r\nmonaco.languages.typescript.typescriptDefaults.addExtraLib(dog, 'dog.d.ts');            \r\n```\r\nWhen I go to the editor, and try to `import {Dog} from 'dog';` it works. \r\n\r\nThanks!"}}
{"actor":{"display_login":"jrieken"}}