{"action":"created","issue":{"url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/81","labels_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/81/comments","events_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/81/events","html_url":"https://github.com/clemos/haxe-js-kit/issues/81","id":118776484,"number":81,"title":"Compile-time check of models ignored?","user":{"login":"kevinresol","id":1103788,"avatar_url":"https://avatars.githubusercontent.com/u/1103788?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinresol","html_url":"https://github.com/kevinresol","followers_url":"https://api.github.com/users/kevinresol/followers","following_url":"https://api.github.com/users/kevinresol/following{/other_user}","gists_url":"https://api.github.com/users/kevinresol/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinresol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinresol/subscriptions","organizations_url":"https://api.github.com/users/kevinresol/orgs","repos_url":"https://api.github.com/users/kevinresol/repos","events_url":"https://api.github.com/users/kevinresol/events{/privacy}","received_events_url":"https://api.github.com/users/kevinresol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-11-25T07:06:37Z","updated_at":"2015-11-25T14:33:27Z","closed_at":null,"body":"Consider a model defined as follow:\r\n```haxe\r\ntypedef StuffData = {\r\n\ttest : String,\r\n\tfoo : Int,\r\n\t?bar : {\r\n\t\thello : String,\r\n\t\tworld : Array<Dynamic>\r\n\t}\r\n}\r\n\r\n// declare the model\r\n// the typedef fields will be \"copied\" to Stuff instance\r\n@:schemaOptions({\r\n    autoIndex: true\r\n})\r\nclass Stuff extends Model<StuffData>{}\r\nclass StuffManager extends js.npm.mongoose.macro.Manager<StuffData,Stuff>{}\r\n```\r\n\r\nThe following code will compile (but it should not):\r\n```haxe\r\nfunction test(stuff:Stuff) stuff.nonExistentField;\r\n```\r\n\r\nAny idea?\r\n\r\nand `$type(stuff.nonExistentField)` gives me `Dynamic`"},"comment":{"url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/comments/159624161","html_url":"https://github.com/clemos/haxe-js-kit/issues/81#issuecomment-159624161","issue_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/81","id":159624161,"user":{"login":"kevinresol","id":1103788,"avatar_url":"https://avatars.githubusercontent.com/u/1103788?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinresol","html_url":"https://github.com/kevinresol","followers_url":"https://api.github.com/users/kevinresol/followers","following_url":"https://api.github.com/users/kevinresol/following{/other_user}","gists_url":"https://api.github.com/users/kevinresol/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinresol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinresol/subscriptions","organizations_url":"https://api.github.com/users/kevinresol/orgs","repos_url":"https://api.github.com/users/kevinresol/repos","events_url":"https://api.github.com/users/kevinresol/events{/privacy}","received_events_url":"https://api.github.com/users/kevinresol/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T14:33:27Z","updated_at":"2015-11-25T14:33:27Z","body":"ok I will test it for a while and submit a PR if it works fine."}}