上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 468 下一页
摘要: For example, we have a type repersent currency: USD, value should be something like '$123', a string type with `$` and number. So let's say we make a 阅读全文
posted @ 2022-12-24 19:15 Zhentiw 阅读(39) 评论(0) 推荐(0) 编辑
摘要: Currying is the technique of converting a function that takes multiple arguments into a sequence of functions that each take a single argument. But in 阅读全文
posted @ 2022-12-23 15:48 Zhentiw 阅读(20) 评论(0) 推荐(0) 编辑
摘要: jest.mock('./filename', () => { const originalModule = jest.requireActual('./filename') return { ...originalModule, fnA: jest.fn(), fnB: (b: boolean): 阅读全文
posted @ 2022-12-22 16:06 Zhentiw 阅读(21) 评论(0) 推荐(0) 编辑
摘要: This challenge continues from 476 - Sum, it is recommended that you finish that one first, and modify your code based on it to start this challenge. I 阅读全文
posted @ 2022-12-22 15:50 Zhentiw 阅读(17) 评论(0) 推荐(0) 编辑
摘要: Implement a type `Sum<A, B>` that summing two non-negative integers and returns the sum as a string. Numbers can be specified as a string, number, or 阅读全文
posted @ 2022-12-21 22:41 Zhentiw 阅读(17) 评论(0) 推荐(0) 编辑
摘要: // Doesn't work import React from 'react' import { saveInfo } from './api' export default function App() { const [count, setCount] = React.useState(0) 阅读全文
posted @ 2022-12-21 16:11 Zhentiw 阅读(10) 评论(0) 推荐(0) 编辑
摘要: https://bestofjs.org/projects/valtio Cool things about Valtio, it is completely independ from React component. It is self testable and hook with React 阅读全文
posted @ 2022-12-21 16:05 Zhentiw 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Implement a type-level integers comparator. We've provided an enum for indicating the comparison result, like this: If a is greater than b, type shoul 阅读全文
posted @ 2022-12-19 15:32 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Implement the JavaScript Array.slice function in the type system. Slice<Arr, Start, End> takes the three argument. The output should be a subarray of  阅读全文
posted @ 2022-12-16 15:28 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要: It is useful to enable '@typescript-eslint/unbound-method': 'error', because this kind of error is related to this keyword, sometime it is hard to not 阅读全文
posted @ 2022-12-15 20:39 Zhentiw 阅读(555) 评论(0) 推荐(0) 编辑
上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 468 下一页