Skip to content

Commit

Permalink
chore: clean up type exports (ca-plants#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkenny54 authored Feb 2, 2025
1 parent a45b408 commit 34a8125
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/htmltaxon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { TextUtils } from "./textutils.js";
data: (taxon: import("./taxon.js").Taxon) => string;
title: string;
}} TaxaColDef
@typedef {"calscape"|"cch"|"fna"} RefSourceCode
*/

/**
Expand Down Expand Up @@ -88,7 +87,7 @@ class HTMLTaxon {
/**
* @param {string[]} links
* @param {import("./taxon.js").Taxon} taxon
* @param {RefSourceCode} sourceCode
* @param {import("./index.js").RefSourceCode} sourceCode
*/
static addRefLink(links, taxon, sourceCode) {
const source = REFLINKS[sourceCode];
Expand Down
8 changes: 7 additions & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export type NativeStatusCode = "N" | "NC" | "U" | "X";

type PhotoRights = "CC0" | "CC BY" | "CC BY-NC" | "C" | null;

type RefSourceCode = "calscape" | "cch" | "fna";

export type TaxonData = {
bloom_end: string;
bloom_start: string;
Expand Down Expand Up @@ -66,7 +68,6 @@ export class Exceptions {

export class ExternalSites {
static getCCH2ObsLink(taxon: Taxon, config: Config): URL | undefined;
static getCCH2RefLink(taxon: Taxon): URL | undefined;
}

export class Family {
Expand Down Expand Up @@ -117,6 +118,11 @@ export class HTMLTaxon {
href: URL | string | undefined,
label: string,
): void;
static addRefLink(
links: string[],
taxon: Taxon,
sourceCode: RefSourceCode,
): void;
static getFooterHTML(taxon: Taxon): string;
static getListSectionHTML(
list: string[],
Expand Down

0 comments on commit 34a8125

Please sign in to comment.