Back to front pageView on Hacker News (opens in a new tab)Show HN: A SQL database implemented purely in TypeScript type annotations (opens in a new tab)github.com426 pointsby phpnode (on Hacker News)6 years agogithub.com (opens in a new tab)GitHub - codemix/ts-sql: A SQL database implemented purely in TypeScript type annotations.A SQL database implemented purely in TypeScript type annotations. - codemix/ts-sqlComments (191) 32 threadsShow all commentsShowing thread 11 of 32[-]gitgud6 years ago1 reply#Wow, I hope the typescript compiler is ready for this kind of dynamic complexity... type Protocol = 'http' | 'https'; type DomainExtension = 'com' | 'org' | 'net'; type DomainName = 'example' | 'google'; type Domain = `${DomainName}.${DomainExtension}`; type Path = string; type ApiEndpoint = `${Protocol}://${Domain}/${Path}`; This would seemingly get out of hand very quickly...ruffrey6 years ago#I work on a codebase with a lot of this type of code. So far the compiler is up for it. The only time it gets slow is using the Zod language for runtime validation.
Show HN: A SQL database implemented purely in TypeScript type annotations (opens in a new tab)github.com426 pointsby phpnode (on Hacker News)6 years ago
gitgud6 years ago1 reply#Wow, I hope the typescript compiler is ready for this kind of dynamic complexity... type Protocol = 'http' | 'https'; type DomainExtension = 'com' | 'org' | 'net'; type DomainName = 'example' | 'google'; type Domain = `${DomainName}.${DomainExtension}`; type Path = string; type ApiEndpoint = `${Protocol}://${Domain}/${Path}`; This would seemingly get out of hand very quickly...
ruffrey6 years ago#I work on a codebase with a lot of this type of code. So far the compiler is up for it. The only time it gets slow is using the Zod language for runtime validation.
Comments (191) 32 threads
Show all comments
Showing thread 11 of 32