Skip to content

Commit

Permalink
fix: typage des paramètres optionnels
Browse files Browse the repository at this point in the history
  • Loading branch information
thom4parisot committed Apr 15, 2024
1 parent d27bb8b commit 28a05b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cepages.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import cepages from './data/cepages.json' assert { type: 'json' }
* @property {String} code
* @property {String} libelle
* @property {CepageCouleur} couleur
* @property {String?} code_cpf
* @property {String=} code_cpf
* @property {Boolean} is_selectable
*/

Expand Down
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import cpf from './data/cpf.json' assert { type: 'json' }
* @property {String} code_cpf
* @property {String} libelle_code_cpf
* @property {String} code_cpf_alias
* @property {String?} code_bureau_veritas
* @property {String=} code_bureau_veritas
* @property {String[]} codes_geofolia
* @property {Boolean} is_selectable
* @property {String} groupe
Expand All @@ -29,7 +29,7 @@ import cpf from './data/cpf.json' assert { type: 'json' }
/**
* @deprecated since version 1.4.0
* @param {String} code
* @param {String?} precision
* @param {String=} precision
* @returns {?UnifiedCulture}
*/
export function fromCodePac (code, precision) {
Expand Down Expand Up @@ -75,7 +75,7 @@ export function fromCodePacFirst (code, precision) {
* Return all CPF codes associated to a given PAC code
*
* @param {String} code
* @param {String?} precision
* @param {String=} precision
* @returns {UnifiedCulture[]}
*/
export function fromCodePacAll (code, precision = null) {
Expand All @@ -98,7 +98,7 @@ export function fromCodeCpf (code) {

/**
* @param {String} code
* @returns {UnifiedCulture?}
* @returns {UnifiedCulture|null}
*/
export function fromCodeGeofolia (code) {
if (typeof code !== 'string') {
Expand Down Expand Up @@ -163,7 +163,7 @@ export function createCpfResolver (cultures) {
* 4. lists of all of the above (xx.yy.z1, xx.aa.*, zz.*)
*
* @param {String} selector
* @param {String?} precision
* @param {String=} precision
* @returns {UnifiedCulture[]}
*/
return function cpfResolver (selector, precision = null) {
Expand Down

0 comments on commit 28a05b7

Please sign in to comment.