{"id":4531,"date":"2014-03-30T13:14:25","date_gmt":"2014-03-30T13:14:25","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/property-type-from-variable-collection-of-common-programming-errors\/"},"modified":"2014-03-30T13:14:25","modified_gmt":"2014-03-30T13:14:25","slug":"property-type-from-variable-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/property-type-from-variable-collection-of-common-programming-errors\/","title":{"rendered":"Property Type from variable-Collection of common programming errors"},"content":{"rendered":"<p>This is completely impossible.<br \/>\nIf you think carefully about it, it doesn&#8217;t make any sense in the first place.<\/p>\n<p>Properties must have <em>compile-time<\/em> types; you&#8217;re trying to define a property whose type is only known at runtime.<br \/>\nHow would you be able to use the property?<\/p>\n<p>Instead, you can either make an <code>object<\/code> property or use generics.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is completely impossible. If you think carefully about it, it doesn&#8217;t make any sense in the first place. Properties must have compile-time types; you&#8217;re trying to define a property whose type is only known at runtime. How would you be able to use the property? Instead, you can either make an object property or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4531","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4531"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4531\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}