jianjiachenghub

Results 4 issues of jianjiachenghub

函数的类型/重载.ts(4,39): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. ``` function reverse(x: number): number; function reverse(x: string): string; function reverse(x: number | string): number...

``` let tom: [string, number]; tom[0] = 'Tom'; tom[1] = 25; tom[0].slice(1); tom[1].toFixed(2); ``` TSError: ⨯ Unable to compile TypeScript: tom is used before being assigned

``` type EventNames = 'click' | 'scroll' | 'mousemove'; function handleEvent(ele: Element, event: EventNames) { // do something } handleEvent(document.getElementById('hello'), 'scroll'); // 没问题 handleEvent(document.getElementById('world'), 'dbclick'); // 报错,event 不能为 'dbclick' //...

### Have you read the Contributing Guidelines on issues? - [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues). ### Prerequisites - [X] I'm using the latest version of Docusaurus....

bug
domain: markdown
apprentice