Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve TS Doc descriptions for branch & scheme filters #65

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/helpers/branchFilter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* Pluggable Function for Filtering to a Top Concept Branch within a SKOS Concept Scheme
*/

type BranchOptions = {
schemeId: string
branchId: string
Expand All @@ -12,6 +8,14 @@ type BranchFilterResult = {
params: BranchOptions
}

/**
* Document Branch Filter
*
* A pluggable Function for Filtering to a Top Concept Branch within a SKOS Concept Scheme
* @param options.schemeId The unique six character concept identifier for the Concept Scheme to which you wish to filter.
* @param options.branchId The unique six character concept identifier of a branch. Child concepts will be returned.
* @returns A reference type filter for the child concepts of the designated branch in the selected Concept Scheme
*/
export function branchFilter(options: BranchOptions): BranchFilterResult {
const {schemeId, branchId} = options || {}
return {
Expand Down
11 changes: 7 additions & 4 deletions src/helpers/schemeFilter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* Pluggable Function for Filtering to a Single SKOS Concept Scheme
*/

type SchemeOptions = {
schemeId: string
}
Expand All @@ -11,6 +7,13 @@ type SchemeFilterResult = {
params: SchemeOptions
}

/**
* Document Scheme Filter
*
* Pluggable Function for Filtering to a Single SKOS Concept Scheme
* @param options.schemeId The unique six character concept identifier for the Concept Scheme to which you wish to filter.
* @returns A reference type filter for Concepts and Top Concepts in the selected Concept Scheme
*/
export function schemeFilter(options: SchemeOptions): SchemeFilterResult {
const {schemeId} = options || {}
return {
Expand Down