自我介绍
monorepo和multirepo的区别
monorepo技术方案有哪些
pnpm解决了什么问题
为什么包和依赖要放到同一个目录下
.pnpm/<packagename>@<version>/node_modules/<packagename>
讲项目
react里面如何用redux
connect原理
React Hooks 和 Vue Hooks的区别
TypeScript获取数据类型的方法
手写:实现类型PromiseResType,如下面的例子
// 验证 async function strPromise() { return "string promise"; } interface Person { name: string; age: number; } async function personPromise() { return { name: "p", age: 12, } as Person; } type StrPromise = ReturnType<typeof strPromise>; // Promise<string> // 反解 type StrPromiseRes = PromiseResType<StrPromise>; // str type PersonPromise = ReturnType<typeof personPromise>; // Promise<Person> // 反解 type PersonPromiseRes = PromiseResType<PersonPromise>; // Person
async function async1() { console.log('async1 start'); await async2(); console.log('async1 end'); } async function async2() { console.log('async2 start'); return new Promise((resolve, reject) => { resolve(); console.log('async2 promise'); }) } console.log('script start'); setTimeout(function () { console.log('setTimeout'); }, 0); async1(); new Promise(function (resolve) { console.log('promise1'); resolve(); }).then(function () { console.log('promise2'); }).then(function () { console.log('promise3'); }); console.log('script end');
大文件上传
手写:金额格式化