* Checks whether this exports info is export provided. * @param {ExportInfoName | ExportInfoName[]} name the name of the export * @returns {boolean | undefined | null} if the export is provided
(name)
| 705 | * @returns {boolean | undefined | null} if the export is provided |
| 706 | */ |
| 707 | isExportProvided(name) { |
| 708 | if (Array.isArray(name)) { |
| 709 | /** @type {ExportsInfo} */ |
| 710 | let exportsInfo = this; |
| 711 | const last = name.length - 1; |
| 712 | for (let i = 0; ; i++) { |
| 713 | const info = exportsInfo.getReadOnlyExportInfo(name[i]); |
| 714 | if (info.exportsInfo && i < last) { |
| 715 | exportsInfo = info.exportsInfo; |
| 716 | continue; |
| 717 | } |
| 718 | return info.provided ? i === last || undefined : info.provided; |
| 719 | } |
| 720 | } |
| 721 | const info = this.getReadOnlyExportInfo(name); |
| 722 | return info.provided; |
| 723 | } |
| 724 | |
| 725 | /** |
| 726 | * Returns key representing the usage. |
nothing calls this directly
no test coverage detected