HostGator Web Hosting

Working Static Type Inference Without Functions as Type Proxies

[ad_1] Holy Smokes! This took me days to work out, and it needed the nominal types hack to work, but [boy does it work](https://www.typescriptlang.org/play?#code/C4TwDgpgBAKgcgHgMpQgD2BAdgEwM5R7ABOAllgOYB8UAvFCgGRQDeA+gFxQCuuEAZuQg4AvgG4AUBNCQoAJRgB5AEYArCAGNgdVsC4ByAPZrNwfQBooxLgpjgIAWQCGYS4Zsw7kZ2HHT78jBIJOQUOix6UPpEZJT6fjLQCnDcALbKEMThkfpYaRnE8ZKJgQBChoYANhBOWNkGyhXVtUVSJbYBtBJQPVAAPoEq6lrdvQMKwbEUoz3j8PmZM-1lTTVYEpL+sh3eLuEA2gDWHDGhALoeXhB+W9AAklj8mQgwNF29sKgY2PiBk6FQAD8hBClCgHCWMC+mFwBGSCyywLy6Uy4Mh0J+cJg5SqayBUEauNqaI+UPQMN+CiGpnxLCWH32xAAjlByFBDhAQIZ+LB9vpCmcLvSPr0Hk9iC8+QLGUyzlQliIoMw6SLevtDGBWXUOVyeTA+YZ9ILARDVaqxc99UYjeqwHKFSTelgIAA3Rabfi8LSkQx1PCkVJgapXF4Y2EgqZUAAUkRgAEouBEuPAXlRFSxiBBgNxiHUk1BtE4CCnXiIbp6sN7fRGowndMnENFQRR9GnWJns7nCAGgxArlGm1N9HGxCIJBWq3VkbXE7HG8iCq30x2c36e8H7AOF5lh6OpBPgD6-SEtAg5GHKZ57D5o5mmdxSJmcDYE0t8ymjCYtK3LNZ5G5EzLCQVV6FcuxA1UcmMYYzCgItYEbaDTB-YUej-O8HyfcxUKgdxWDHD4-DHccvUPatM0qJw0GEBBFAvLErhvKMNTIrAnEqLhFFfD530Qr8zCoX9AIAqBFDHCCrCzVdWBwqD+P0ODiz4mCULNKxhJwvCWKPdjsMIiRiIPI8oFSUhqJwM96MCRiXEsOjyUxazrxcW8IHvR9hBsNwwFY9jOO43peIQT8VME9T-1wzjxKWMC81kgwkO-RSEOCxKBL0s10LczDhAy1UtJ8nTKjyqAx2IjRfSICMAXoGJa0kCqsCq7csnoacRwkRqqsJZo6lq9c+03fQerWXcpC67QkEMDRSHY0hMB0U4tCjCS2NSCAuFOSgSqcCgNqgFqSv4WoNBALgRtqbCRDjW4GGm2bKnm6B6AtCVEm5O6ZrmzAqE2CbYGIJwcAgPBUmJehTPMlaljW-atooHa9q4Q6DPMCTlAfSpgb-C6sBKgB3CAscyc7VkupYidMMgvqwUmiTxgybpKGBAeB0HwagV6EHevVWZBsGsF+qQAHphagF05pwXD+LwTrKu0PAAEYuCmr7HoW+gWFhgwAAtuAKMxLF2-aABYAAZLGOyszoLYhuGuBr5YLZWAaB-mOa1px1oMSpuA5Cw4KRqAAGYACZLEprRqdm2nbftvx-uAUPkz59m+tYbWomIEAWiNoPQ4ATksDHSGJv8SHtyxCbLrhjsqPAHZFsXyAlx6pbS2X-rwZPPoep7wkzk3w8D-b9BwXgsENS2TptvJKkqBOneAYOU7dtOB690fVCcDRDgD42uFDgBWYvMexgwQBB+IJCAA)! I’ve been looking at the [various runtime type & validation libs](https://github.com/moltar/typescript-runtime-type-benchmarks) and I’m generally impressed by what they do, but the dependence on function objects to Read more…