[README] Create an OTHER_FILES.txt section (#50149)

This commit is contained in:
Jack Bates
2020-12-19 05:07:36 -07:00
committed by GitHub
parent 889b37ddd2
commit b87e8efce6
7 changed files with 37 additions and 4 deletions

View File

@@ -26,6 +26,7 @@
- [Linter: `tslint.json`](#linter-tslintjson)
- [`tsconfig.json`](#tsconfigjson)
- [`package.json`](#packagejson)
- [`OTHER_FILES.txt`](#other_filestxt)
- [常见错误](#常见错误)
</details>
- [Definition Owners](#definition-owners)
@@ -297,6 +298,10 @@ Definitely Typed 包的发布者会为在 Definitely Typed 之外没有依赖的
在极少数情况下,`@types` 包会被删除,而不是源码包中提供的类型,并且你需要依赖旧的已经删除的 `@types` 包,你可以添加对 `@types` 包的依赖。
再添加到允许的包列表中时,请确保作出解释,以便让人工维护者知道发生了什么。
#### `OTHER_FILES.txt`
If a file is neither tested nor referenced in `index.d.ts`, add it to a file named `OTHER_FILES.txt`. This file is a list of other files that need to be included in the typings package, one file per line.
#### 常见错误
* 首先,请遵循 [手册](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html) 的建议。

View File

@@ -19,6 +19,7 @@ Vea también el sitio web [definitelytyped.org](http://definitelytyped.org), aun
- [Linter: `tslint.json`](#linter-tslintjson)
- [`tsconfig.json`](#tsconfigjson)
- [`package.json`](#packagejson)
- [`OTHER_FILES.txt`](#other_filestxt)
- [Errores comunes](#errores-comunes)
</details>
- [Definition Owners](#definition-owners)
@@ -264,6 +265,10 @@ Un `package.json` puede ser incluido por el bien de especificar dependencias. Aq
No aceptamos otros campos, tales como `"description"`, para que sean definidos manualmente.
Además, si necesitas referencia a una versión anterior de typings, debes hacerlo añadiendo `"dependencies": { "@types/foo": "x.y.z" }` al `package.json`.
#### `OTHER_FILES.txt`
If a file is neither tested nor referenced in `index.d.ts`, add it to a file named `OTHER_FILES.txt`. This file is a list of other files that need to be included in the typings package, one file per line.
#### Errores comunes
* Primero, sigue el consejo del [manual](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).

View File

@@ -22,6 +22,7 @@
- [`tsconfig.json`](#tsconfigjson)
- [`package.json`](#packagejson)
- [よくあるミス](#よくあるミス)
- [`OTHER_FILES.txt`](#other_filestxt)
</details>
- [型定義のオーナー](#型定義のオーナー)
* [よくある質問](#よくある質問)
@@ -186,8 +187,6 @@ dts-gen の全オプションは[こちら](https://github.com/Microsoft/dts-gen
`index.d.ts` の他にも `.d.ts` ファイルがある場合は、それらが `index.d.ts` かテストコードのいずれかにおいて参照されているかどうか確認してください。
もしテストもされず、 `index.d.ts` でも参照されないファイルがある場合は、そのファイル名を `OTHER_FILES.txt` という名前のファイルに追記してください。このファイルは、型定義パッケージに含めたいその他のファイルを、1行につき1ファイルで記述した一覧です。
Definitely Typed のメンバーは常に新しい PR をチェックしていますが、他の PR の数によっては対応が遅れる場合があることをご了承ください。
[base64-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/base64-js) を、パッケージのサンプルとして参考にするのがよいでしょう。
@@ -318,6 +317,10 @@ DefinitelyTyped 外のモジュールに依存しないパッケージについ
`any` を共用体型で使用した場合、最終的な型は `any` 型にしかなりません。したがって、例示された型注釈では、 `string` の部分が有用に**見えますが**、実際には単に `any` と指定したとき以上の型チェックは行われません。
シチュエーションにもよりますが、 `any` や `string`、 `string | object` が代替案として考えられます。
#### `OTHER_FILES.txt`
もしテストもされず、 `index.d.ts` でも参照されないファイルがある場合は、そのファイル名を `OTHER_FILES.txt` という名前のファイルに追記してください。このファイルは、型定義パッケージに含めたいその他のファイルを、1行につき1ファイルで記述した一覧です。
### 型定義のオーナー
DefinitelyTyped では、ある特定のモジュールの型定義の品質を管理している人を「型定義のオーナー」としています。

View File

@@ -24,6 +24,7 @@
- [Linter: `tslint.json`](#linter-tslintjson)
- [`tsconfig.json`](#tsconfigjson)
- [`package.json`](#packagejson)
- [`OTHER_FILES.txt`](#other_filestxt)
- [많이 저지르는 실수들](#많이-저지르는-실수들)
</details>
- [Definition Owners](#definition-owners)
@@ -291,6 +292,10 @@ If for some reason some rule needs to be disabled, [disable it for that specific
의존성을 제외한 다른 필드(Field)들, 그러니까 `"description"` 같은 것들은 사용해서는 안됩니다.
옛날 `@types` 패키지를 사용하고 싶으실 경우에도 `"dependencies": { "@types/foo": "x.y.z" }` 와 같은 내용을 `package.json` 파일에 넣으셔야 합니다.
#### `OTHER_FILES.txt`
If a file is neither tested nor referenced in `index.d.ts`, add it to a file named `OTHER_FILES.txt`. This file is a list of other files that need to be included in the typings package, one file per line.
#### 많이 저지르는 실수들
* 우선, [안내서(Handbook)](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html)에 나와있는 내용들을 따라주세요.

View File

@@ -21,6 +21,7 @@
- [Linter: `tslint.json`](#linter-tslintjson)
- [`tsconfig.json`](#tsconfigjson)
- [`package.json`](#packagejson)
- [`OTHER_FILES.txt`](#other_filestxt)
- [Common mistakes](#common-mistakes)
</details>
- [Definition Owners](#definition-owners)
@@ -184,7 +185,7 @@ Your package should have this structure:
Generate these by running `npx dts-gen --dt --name <my-package> --template module` if you have npm ≥ 5.2.0, `npm install -g dts-gen` and `dts-gen --dt --name <my-package> --template module` otherwise.
See all options at [dts-gen](https://github.com/Microsoft/dts-gen).
If you have `.d.ts` files besides `index.d.ts`, make sure that they are referenced either in `index.d.ts` or the tests. If a file is neither tested nor referenced in `index.d.ts`, add it to a file named `OTHER_FILES.txt`. This file is a list of other files that need to be included in the typings package, one file per line.
If you have `.d.ts` files besides `index.d.ts`, make sure that they are referenced either in `index.d.ts` or the tests.
Definitely Typed members routinely monitor for new PRs, though keep in mind that the number of other PRs may slow things down.
@@ -297,6 +298,10 @@ This list is updated by a human, which gives us the chance to make sure that `@t
In the rare case that an `@types` package is deleted and removed in favor of types shipped by the source package AND you need to depend on the old, removed `@types` package, you can add a dependency on an `@types` package.
Be sure to explain this when adding to the list of allowed packages so that the human maintainer knows what is happening.
#### `OTHER_FILES.txt`
If a file is neither tested nor referenced in `index.d.ts`, add it to a file named `OTHER_FILES.txt`. This file is a list of other files that need to be included in the typings package, one file per line.
#### Common mistakes
* First, follow advice from the [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).

View File

@@ -22,6 +22,7 @@ Veja também o site [definitelytyped.org](http://definitelytyped.org), embora as
- [Linter: `tslint.json`](#linter-tslintjson)
- [`tsconfig.json`](#tsconfigjson)
- [`package.json`](#package.json)
- [`OTHER_FILES.txt`](#other_filestxt)
- [Erros comuns](#erros-comuns)
</details>
- [Donos de definição](#donos-de-definição)
@@ -185,7 +186,7 @@ Seu pacote deve possuir a seguinte estrutura:
Gere esses arquivos executando `npx dts-gen --dt --name nome-do-seu-pacote --template module` se você possuir a versão 5.2.0 ou mais recente do NPM ou `npm install -g dts-gen` e `dts-gen --dt --name nome-do-seu-pacote --template module` caso possua uma versão mais antiga.
Veja todas as opções em [dts-gen](https://github.com/Microsoft/dts-gen).
Se há outros arquivos `.d.ts` além do arquivo `index.d.ts`, tenha certeza de que eles são referenciados no arquivo `index.d.ts` ou nos testes. Se um arquivo não for testado nem referenciado no `index.d.ts`, adicione-o em um arquivo chamado `OTHER_FILES.txt`. Este arquivo é uma lista de outros arquivos que precisam ser incluidos no pacote de tipos, um arquivo por linha.
Se há outros arquivos `.d.ts` além do arquivo `index.d.ts`, tenha certeza de que eles são referenciados no arquivo `index.d.ts` ou nos testes.
Os membros do Definitely Typed frequentemente monitoram os novos PRs, porém tenha em mente de que a quantidade de PRs pode atrasar o processo.
@@ -297,6 +298,10 @@ Essa lista é atualizada por um humano, o que nos dá a chance de nos certificar
Nos caso raro que um pacote `@types` é deletado e removido em favor dos tipos enviados pelo pacote-fonte e você precise depender do pacote antigo `@types`, já removido, você pode adicionar a dependência no pacote `@types`.
Tenha certeza de explicar isso quando adicioná-lo à lista de pacotes permitidos, para que o mantenedor humano saiba o que está acontecendo.
#### `OTHER_FILES.txt`
Se um arquivo não for testado nem referenciado no `index.d.ts`, adicione-o em um arquivo chamado `OTHER_FILES.txt`. Este arquivo é uma lista de outros arquivos que precisam ser incluidos no pacote de tipos, um arquivo por linha.
#### Erros comuns
* Primeiro, siga as instruções do [manual](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).

View File

@@ -24,6 +24,7 @@ _Вы также можете прочитать этот README на [англ
- [Linter: `tslint.json`](#linter-tslintjson)
- [`tsconfig.json`](#tsconfigjson)
- [`package.json`](#packagejson)
- [`OTHER_FILES.txt`](#other_filestxt)
- [Распространенные ошибки](#распространенные-ошибки)
</details>
- [Definition Owners](#definition-owners)
@@ -287,6 +288,10 @@ If for some reason some rule needs to be disabled, [disable it for that specific
Мы не разрешаем определять другие поля, такие как "description", вручную.
Кроме того, если вам нужно сослаться на более старую версию типизаций, вы должны сделать это, добавив в `package.json` строки `"dependencies": { "@types/foo": "x.y.z" }`.
#### `OTHER_FILES.txt`
If a file is neither tested nor referenced in `index.d.ts`, add it to a file named `OTHER_FILES.txt`. This file is a list of other files that need to be included in the typings package, one file per line.
#### Распространенные ошибки
* Сначала следуйте советам из справочника [handbook](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).