{"action":"created","comment":{"url":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/comments/52877936","id":52877936,"diff_hunk":"@@ -465,7 +465,7 @@ export class MarkType extends SchemaItem {\n // with node type constructors and another similar object associating\n // mark names with mark type constructors.\n export class SchemaSpec {\n-  // :: (?Object<NodeType>, ?Object<MarkType>)\n+  // :: (?Object<SubClass<NodeType>>, ?Object<SubClass<MarkType>>)","path":"src/model/schema.js","position":14,"original_position":14,"commit_id":"932d30f6e8b5aac340475774bddec10a9bd80d64","original_commit_id":"932d30f6e8b5aac340475774bddec10a9bd80d64","user":{"login":"adrianheine","id":139208,"avatar_url":"https://avatars.githubusercontent.com/u/139208?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianheine","html_url":"https://github.com/adrianheine","followers_url":"https://api.github.com/users/adrianheine/followers","following_url":"https://api.github.com/users/adrianheine/following{/other_user}","gists_url":"https://api.github.com/users/adrianheine/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianheine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianheine/subscriptions","organizations_url":"https://api.github.com/users/adrianheine/orgs","repos_url":"https://api.github.com/users/adrianheine/repos","events_url":"https://api.github.com/users/adrianheine/events{/privacy}","received_events_url":"https://api.github.com/users/adrianheine/received_events","type":"User","site_admin":false},"body":"I took it from Flow, or, more precisely React: facebook/flow#814. Both TypeScript and Flow use `typeof` to refer to the type of instances of something, so `typeof NodeType` would be `NodeType`, but that doesn't support polymorphism. I actually think this pattern is not too great, since being a sub-class of something doesn't give you a lot of guarantees. I'd rather go with passing builders `Object<()  → NodeType>`, but I don't know if that solves your usecase.","created_at":"2016-02-15T09:51:10Z","updated_at":"2016-02-15T09:51:10Z","html_url":"https://github.com/ProseMirror/prosemirror/pull/195#discussion_r52877936","pull_request_url":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/195","_links":{"self":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/comments/52877936"},"html":{"href":"https://github.com/ProseMirror/prosemirror/pull/195#discussion_r52877936"},"pull_request":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/195","id":59333856,"html_url":"https://github.com/ProseMirror/prosemirror/pull/195","diff_url":"https://github.com/ProseMirror/prosemirror/pull/195.diff","patch_url":"https://github.com/ProseMirror/prosemirror/pull/195.patch","issue_url":"https://api.github.com/repos/ProseMirror/prosemirror/issues/195","number":195,"state":"open","locked":false,"title":"Add & fix docs","user":{"login":"adrianheine","id":139208,"avatar_url":"https://avatars.githubusercontent.com/u/139208?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianheine","html_url":"https://github.com/adrianheine","followers_url":"https://api.github.com/users/adrianheine/followers","following_url":"https://api.github.com/users/adrianheine/following{/other_user}","gists_url":"https://api.github.com/users/adrianheine/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianheine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianheine/subscriptions","organizations_url":"https://api.github.com/users/adrianheine/orgs","repos_url":"https://api.github.com/users/adrianheine/repos","events_url":"https://api.github.com/users/adrianheine/events{/privacy}","received_events_url":"https://api.github.com/users/adrianheine/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-15T08:39:36Z","updated_at":"2016-02-15T09:51:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d7eabb73d20c2030e0513131576829c4c27479b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/195/commits","review_comments_url":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/195/comments","review_comment_url":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ProseMirror/prosemirror/issues/195/comments","statuses_url":"https://api.github.com/repos/ProseMirror/prosemirror/statuses/932d30f6e8b5aac340475774bddec10a9bd80d64","head":{"label":"adrianheine:fixDocs","ref":"fixDocs","sha":"932d30f6e8b5aac340475774bddec10a9bd80d64","user":{"login":"adrianheine","id":139208,"avatar_url":"https://avatars.githubusercontent.com/u/139208?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianheine","html_url":"https://github.com/adrianheine","followers_url":"https://api.github.com/users/adrianheine/followers","following_url":"https://api.github.com/users/adrianheine/following{/other_user}","gists_url":"https://api.github.com/users/adrianheine/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianheine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianheine/subscriptions","organizations_url":"https://api.github.com/users/adrianheine/orgs","repos_url":"https://api.github.com/users/adrianheine/repos","events_url":"https://api.github.com/users/adrianheine/events{/privacy}","received_events_url":"https://api.github.com/users/adrianheine/received_events","type":"User","site_admin":false},"repo":{"id":46550736,"name":"prosemirror","full_name":"adrianheine/prosemirror","owner":{"login":"adrianheine","id":139208,"avatar_url":"https://avatars.githubusercontent.com/u/139208?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianheine","html_url":"https://github.com/adrianheine","followers_url":"https://api.github.com/users/adrianheine/followers","following_url":"https://api.github.com/users/adrianheine/following{/other_user}","gists_url":"https://api.github.com/users/adrianheine/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianheine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianheine/subscriptions","organizations_url":"https://api.github.com/users/adrianheine/orgs","repos_url":"https://api.github.com/users/adrianheine/repos","events_url":"https://api.github.com/users/adrianheine/events{/privacy}","received_events_url":"https://api.github.com/users/adrianheine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adrianheine/prosemirror","description":"The ProseMirror WYSIWYM editor","fork":true,"url":"https://api.github.com/repos/adrianheine/prosemirror","forks_url":"https://api.github.com/repos/adrianheine/prosemirror/forks","keys_url":"https://api.github.com/repos/adrianheine/prosemirror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adrianheine/prosemirror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adrianheine/prosemirror/teams","hooks_url":"https://api.github.com/repos/adrianheine/prosemirror/hooks","issue_events_url":"https://api.github.com/repos/adrianheine/prosemirror/issues/events{/number}","events_url":"https://api.github.com/repos/adrianheine/prosemirror/events","assignees_url":"https://api.github.com/repos/adrianheine/prosemirror/assignees{/user}","branches_url":"https://api.github.com/repos/adrianheine/prosemirror/branches{/branch}","tags_url":"https://api.github.com/repos/adrianheine/prosemirror/tags","blobs_url":"https://api.github.com/repos/adrianheine/prosemirror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adrianheine/prosemirror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adrianheine/prosemirror/git/refs{/sha}","trees_url":"https://api.github.com/repos/adrianheine/prosemirror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adrianheine/prosemirror/statuses/{sha}","languages_url":"https://api.github.com/repos/adrianheine/prosemirror/languages","stargazers_url":"https://api.github.com/repos/adrianheine/prosemirror/stargazers","contributors_url":"https://api.github.com/repos/adrianheine/prosemirror/contributors","subscribers_url":"https://api.github.com/repos/adrianheine/prosemirror/subscribers","subscription_url":"https://api.github.com/repos/adrianheine/prosemirror/subscription","commits_url":"https://api.github.com/repos/adrianheine/prosemirror/commits{/sha}","git_commits_url":"https://api.github.com/repos/adrianheine/prosemirror/git/commits{/sha}","comments_url":"https://api.github.com/repos/adrianheine/prosemirror/comments{/number}","issue_comment_url":"https://api.github.com/repos/adrianheine/prosemirror/issues/comments{/number}","contents_url":"https://api.github.com/repos/adrianheine/prosemirror/contents/{+path}","compare_url":"https://api.github.com/repos/adrianheine/prosemirror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adrianheine/prosemirror/merges","archive_url":"https://api.github.com/repos/adrianheine/prosemirror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adrianheine/prosemirror/downloads","issues_url":"https://api.github.com/repos/adrianheine/prosemirror/issues{/number}","pulls_url":"https://api.github.com/repos/adrianheine/prosemirror/pulls{/number}","milestones_url":"https://api.github.com/repos/adrianheine/prosemirror/milestones{/number}","notifications_url":"https://api.github.com/repos/adrianheine/prosemirror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adrianheine/prosemirror/labels{/name}","releases_url":"https://api.github.com/repos/adrianheine/prosemirror/releases{/id}","deployments_url":"https://api.github.com/repos/adrianheine/prosemirror/deployments","created_at":"2015-11-20T08:56:52Z","updated_at":"2015-11-20T08:56:53Z","pushed_at":"2016-02-15T09:25:56Z","git_url":"git://github.com/adrianheine/prosemirror.git","ssh_url":"git@github.com:adrianheine/prosemirror.git","clone_url":"https://github.com/adrianheine/prosemirror.git","svn_url":"https://github.com/adrianheine/prosemirror","homepage":null,"size":1636,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ProseMirror:master","ref":"master","sha":"1b6c612b764eb9a403d9f39ab82bb23f258cb144","user":{"login":"ProseMirror","id":13659461,"avatar_url":"https://avatars.githubusercontent.com/u/13659461?v=3","gravatar_id":"","url":"https://api.github.com/users/ProseMirror","html_url":"https://github.com/ProseMirror","followers_url":"https://api.github.com/users/ProseMirror/followers","following_url":"https://api.github.com/users/ProseMirror/following{/other_user}","gists_url":"https://api.github.com/users/ProseMirror/gists{/gist_id}","starred_url":"https://api.github.com/users/ProseMirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProseMirror/subscriptions","organizations_url":"https://api.github.com/users/ProseMirror/orgs","repos_url":"https://api.github.com/users/ProseMirror/repos","events_url":"https://api.github.com/users/ProseMirror/events{/privacy}","received_events_url":"https://api.github.com/users/ProseMirror/received_events","type":"Organization","site_admin":false},"repo":{"id":40294964,"name":"prosemirror","full_name":"ProseMirror/prosemirror","owner":{"login":"ProseMirror","id":13659461,"avatar_url":"https://avatars.githubusercontent.com/u/13659461?v=3","gravatar_id":"","url":"https://api.github.com/users/ProseMirror","html_url":"https://github.com/ProseMirror","followers_url":"https://api.github.com/users/ProseMirror/followers","following_url":"https://api.github.com/users/ProseMirror/following{/other_user}","gists_url":"https://api.github.com/users/ProseMirror/gists{/gist_id}","starred_url":"https://api.github.com/users/ProseMirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProseMirror/subscriptions","organizations_url":"https://api.github.com/users/ProseMirror/orgs","repos_url":"https://api.github.com/users/ProseMirror/repos","events_url":"https://api.github.com/users/ProseMirror/events{/privacy}","received_events_url":"https://api.github.com/users/ProseMirror/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ProseMirror/prosemirror","description":"The ProseMirror WYSIWYM editor","fork":false,"url":"https://api.github.com/repos/ProseMirror/prosemirror","forks_url":"https://api.github.com/repos/ProseMirror/prosemirror/forks","keys_url":"https://api.github.com/repos/ProseMirror/prosemirror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ProseMirror/prosemirror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ProseMirror/prosemirror/teams","hooks_url":"https://api.github.com/repos/ProseMirror/prosemirror/hooks","issue_events_url":"https://api.github.com/repos/ProseMirror/prosemirror/issues/events{/number}","events_url":"https://api.github.com/repos/ProseMirror/prosemirror/events","assignees_url":"https://api.github.com/repos/ProseMirror/prosemirror/assignees{/user}","branches_url":"https://api.github.com/repos/ProseMirror/prosemirror/branches{/branch}","tags_url":"https://api.github.com/repos/ProseMirror/prosemirror/tags","blobs_url":"https://api.github.com/repos/ProseMirror/prosemirror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ProseMirror/prosemirror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ProseMirror/prosemirror/git/refs{/sha}","trees_url":"https://api.github.com/repos/ProseMirror/prosemirror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ProseMirror/prosemirror/statuses/{sha}","languages_url":"https://api.github.com/repos/ProseMirror/prosemirror/languages","stargazers_url":"https://api.github.com/repos/ProseMirror/prosemirror/stargazers","contributors_url":"https://api.github.com/repos/ProseMirror/prosemirror/contributors","subscribers_url":"https://api.github.com/repos/ProseMirror/prosemirror/subscribers","subscription_url":"https://api.github.com/repos/ProseMirror/prosemirror/subscription","commits_url":"https://api.github.com/repos/ProseMirror/prosemirror/commits{/sha}","git_commits_url":"https://api.github.com/repos/ProseMirror/prosemirror/git/commits{/sha}","comments_url":"https://api.github.com/repos/ProseMirror/prosemirror/comments{/number}","issue_comment_url":"https://api.github.com/repos/ProseMirror/prosemirror/issues/comments{/number}","contents_url":"https://api.github.com/repos/ProseMirror/prosemirror/contents/{+path}","compare_url":"https://api.github.com/repos/ProseMirror/prosemirror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ProseMirror/prosemirror/merges","archive_url":"https://api.github.com/repos/ProseMirror/prosemirror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ProseMirror/prosemirror/downloads","issues_url":"https://api.github.com/repos/ProseMirror/prosemirror/issues{/number}","pulls_url":"https://api.github.com/repos/ProseMirror/prosemirror/pulls{/number}","milestones_url":"https://api.github.com/repos/ProseMirror/prosemirror/milestones{/number}","notifications_url":"https://api.github.com/repos/ProseMirror/prosemirror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ProseMirror/prosemirror/labels{/name}","releases_url":"https://api.github.com/repos/ProseMirror/prosemirror/releases{/id}","deployments_url":"https://api.github.com/repos/ProseMirror/prosemirror/deployments","created_at":"2015-08-06T08:55:00Z","updated_at":"2016-02-15T03:35:50Z","pushed_at":"2016-02-15T09:35:11Z","git_url":"git://github.com/ProseMirror/prosemirror.git","ssh_url":"git@github.com:ProseMirror/prosemirror.git","clone_url":"https://github.com/ProseMirror/prosemirror.git","svn_url":"https://github.com/ProseMirror/prosemirror","homepage":null,"size":1947,"stargazers_count":1739,"watchers_count":1739,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":35,"forks":107,"open_issues":35,"watchers":1739,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/195"},"html":{"href":"https://github.com/ProseMirror/prosemirror/pull/195"},"issue":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/issues/195"},"comments":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/ProseMirror/prosemirror/statuses/932d30f6e8b5aac340475774bddec10a9bd80d64"}}}}