Comments (4)
Where is the error?
from typescript-website.
Where is the error?错误在哪里?
look:
by the document context,the example is error.
from typescript-website.
Oh, I got your point. But in this case, I think they mean this: (By the word "instead", they're replacing all overloaded signatures with the union type any[] | string
)
Because both overloads have the same argument count and same return type, we can instead write a non-overloaded version of the function:
from typescript-website.
Oh, I got your point. But in this case, I think they mean this: (By the word "instead", they're replacing all overloaded signatures with the union type
any[] | string
)哦,我明白你的意思了。但在这种情况下,我认为他们的意思是:(通过“代替”这个词,他们正在用联合类型any[] | string
替换所有重载的签名)Because both overloads have the same argument count and same return type, we can instead write a non-overloaded version of the function:由于两个重载具有相同的参数计数和相同的返回类型,因此我们可以改为编写函数的非重载版本:
oh, i get it. thank you!
from typescript-website.
Related Issues (20)
- Basic Types - minor problem HOT 3
- Dead link in the documentation HOT 3
- Your Node sample project should include a "lib" field to prevent incorrect recognition of DOM symbols HOT 3
- typescriptlang.org redirects (no www) generally do not go to the appropriate page HOT 1
- Incorrect information in the documentation on class hierarchies
- More examples of `infer`
- Add `exports` map to `package.json` of `@typescript/twoslash` HOT 1
- ATA: Unable to resolve sub module path for dual published ESM/CJS package HOT 5
- performance page says to use --trace-ic but node says bad option HOT 4
- Errors yarn installing on an M2 Macbook Pro HOT 1
- Upgrade Node Version HOT 1
- Document class constructor property parameters initialization order.
- Global errors differ depending on initial state of playground HOT 1
- Documentation for tsconfig.Plugins is wrong
- Docs: usage of parameter properties as class members in constructor
- CRITICAL:
- There was an issue getting the example, bad URL? at "example/advanced-classes"
- Docs: type 'unknown' missing from 'Everydad Types'
- Should elaborate more on the way conflicts are handled in Interfaces vs. Intersections
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-website.