什么是 place
The description of “what is place” in the file module details is rather vague, and I think the translation is not very good. It takes a lot of reading to understand it. **When I mention the place to be checked, I mean that TypeScript will check the following contents at that place (for example, a place for a file called foo): If the place represents a file, such as foo.ts, then congratulations! Otherwise, if the place is a folder and there is a file called foo/index.ts, then congratulations! Otherwise, if the place is a folder and there is a file called package.json that specifies the existence of a file for types, then congratulations! Otherwise, if the place is a folder and there is a file called package.json that specifies the existence of a file for main, then congratulations! In terms of file types, I actually mean .ts, .d.ts, or .js.
内容来源: jkchao/typescript-book-chinese