fuma-nama / ts-prototype

Some typescript prototypes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript Prototypes

Some prototypes using Typescript's string manipulation.

Target

const userId = 1;
const result = sql(
    "select user.name as name, account.email as email from user",
    "left join account on account.user_id = user.id",
    `where user.id = ${userId}`
);

console.log(result.name, result.email); // no errors
console.log(result.id); // error

Problems

  1. String templates can't be used (see this issue)
  2. Performance will be terrible in large codebases

About

Some typescript prototypes


Languages

Language:TypeScript 100.0%