css-variable icon indicating copy to clipboard operation
css-variable copied to clipboard

createVars

Open jantimon opened this issue 3 years ago • 0 comments

declaring multiple vars at once is quite repetitive right now e.g.:

const a = createVar()
const b = createVar()
const c = createVar()

maybe we could create a new helper createVars which would allow to use the spread operator to declare multiple vars at the same time:

export function* createVars<TValue = string> () { while(1) { yield createVar<TValue>() }}
const [a,b,c] = createVars();

jantimon avatar Jul 15 '22 09:07 jantimon