{"action":"opened","issue":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/8013","repository_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped","labels_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/8013/labels{/name}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/8013/comments","events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/8013/events","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/issues/8013","id":132110827,"number":8013,"title":"Q.d.ts - global 'Q' reference is confusing","user":{"login":"sp00x","id":2563760,"avatar_url":"https://avatars.githubusercontent.com/u/2563760?v=3","gravatar_id":"","url":"https://api.github.com/users/sp00x","html_url":"https://github.com/sp00x","followers_url":"https://api.github.com/users/sp00x/followers","following_url":"https://api.github.com/users/sp00x/following{/other_user}","gists_url":"https://api.github.com/users/sp00x/gists{/gist_id}","starred_url":"https://api.github.com/users/sp00x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sp00x/subscriptions","organizations_url":"https://api.github.com/users/sp00x/orgs","repos_url":"https://api.github.com/users/sp00x/repos","events_url":"https://api.github.com/users/sp00x/events{/privacy}","received_events_url":"https://api.github.com/users/sp00x/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-08T11:01:28Z","updated_at":"2016-02-08T11:01:28Z","closed_at":null,"body":"Not sure if this is just plain wrong usage from my side, but it had me confused for a bit when using from Node.js:\r\n\r\nCompiles fine, shows intellisense in Atom with atom-typescript installed, but blows up at runtime:\r\n\r\n```\r\n/// <reference path=\"typings/q/Q.d.ts\"/>\r\nQ.defer(); // compiles fine, but at runtime: ReferenceError: Q is not defined\r\n```\r\n\r\nUsing a lower-case q variable was what made me see the problem in the case above (missing import):\r\n```\r\n/// <reference path=\"typings/q/Q.d.ts\"/>\r\nq.defer(); // doesn't compile: cannot find name 'q'\r\n```\r\n\r\nObviously this is how it's supposed to be:\r\n```\r\n/// <reference path=\"typings/q/Q.d.ts\"/>\r\nimport q = require('q');\r\nq.defer();\r\n```\r\n\r\nFWIW, this is what I had first, but then moved the code to a separate file but forgot the import:\r\n```\r\n/// <reference path=\"typings/q/Q.d.ts\"/>\r\nimport Q = require('q');\r\nQ.defer();\r\n```\r\n\r\nI'm not sure if I am just doing something weird and wrong here (capital Q), or this is a problem with how the type is defined?"}}