Skip to content

Commit

Permalink
style: Nits on typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChV committed Dec 11, 2023
1 parent 87d508c commit 4bf6f0f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/content-tags-drawer/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const getContentDataApiUrl = (contentId) => new URL(`/xblock/outline/${co
* @param {string} taxonomyId The id of the taxonomy to fetch tags for
* @param {string} fullPathProvided Optional param that contains the full URL to fetch data
* If provided, we use it instead of generating the URL. This is usually for fetching subTags
* @returns {Promise<Object>}
* @returns {Promise<import("./types.mjs").TaxonomyTagsData>}
*/
export async function getTaxonomyTagsData(taxonomyId, fullPathProvided) {
const { data } = await getAuthenticatedHttpClient().get(
Expand All @@ -24,7 +24,7 @@ export async function getTaxonomyTagsData(taxonomyId, fullPathProvided) {
/**
* Get the tags that are applied to the content object
* @param {string} contentId The id of the content object to fetch the applied tags for
* @returns {Promise<Object>}
* @returns {Promise<import("./types.mjs").ContentTaxonomyTagsData>}
*/
export async function getContentTaxonomyTagsData(contentId) {
const { data } = await getAuthenticatedHttpClient().get(getContentTaxonomyTagsApiUrl(contentId));
Expand All @@ -34,7 +34,7 @@ export async function getContentTaxonomyTagsData(contentId) {
/**
* Fetch meta data (eg: display_name) about the content object (unit/compoenent)
* @param {string} contentId The id of the content object (unit/component)
* @returns {Promise<Object>}
* @returns {Promise<import("./types.mjs").ContentData>}
*/
export async function getContentData(contentId) {
const { data } = await getAuthenticatedHttpClient().get(getContentDataApiUrl(contentId));
Expand Down
3 changes: 0 additions & 3 deletions src/content-tags-drawer/data/apiHooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { getTaxonomyTagsData, getContentTaxonomyTagsData, getContentData } from
* @param {string} taxonomyId The id of the taxonomy to fetch tags for
* @param {string} fullPathProvided Optional param that contains the full URL to fetch data
* If provided, we use it instead of generating the URL. This is usually for fetching subTags
* @returns {import('@tanstack/react-query').UseQueryResult<import("./types.mjs").TaxonomyTagsData>}
*/
const useTaxonomyTagsData = (taxonomyId, fullPathProvided) => (
useQuery({
Expand Down Expand Up @@ -45,7 +44,6 @@ export const useIsTaxonomyTagsDataLoaded = (taxonomyId, fullPathProvided) => (
/**
* Builds the query to get the taxonomy tags applied to the content object
* @param {string} contentId The id of the content object to fetch the applied tags for
* @returns {import('@tanstack/react-query').UseQueryResult<import("./types.mjs").ContentTaxonomyTagsData>}
*/
const useContentTaxonomyTagsData = (contentId) => (
useQuery({
Expand Down Expand Up @@ -79,7 +77,6 @@ export const useIsContentTaxonomyTagsDataLoaded = (contentId) => (
/**
* Builds the query to get meta data about the content object
* @param {string} contentId The id of the content object (unit/component)
* @returns {import('@tanstack/react-query').UseQueryResult<import("./types.mjs").ContentData>}
*/
const useContentData = (contentId) => (
useQuery({
Expand Down
2 changes: 1 addition & 1 deletion src/taxonomy/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const getTaxonomyApiUrl = (pk) => new URL(`api/content_tagging/v1/taxonom
/**
* Get list of taxonomies.
* @param {string} org Optioanl organization query param
* @returns {Promise<Object>}
* @returns {Promise<import("./types.mjs").TaxonomyListData>}
*/
export async function getTaxonomyListData(org) {
const { data } = await getAuthenticatedHttpClient().get(getTaxonomyListApiUrl(org));
Expand Down
1 change: 0 additions & 1 deletion src/taxonomy/data/apiHooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { getTaxonomyListData, deleteTaxonomy } from './api';
/**
* Builds the query to get the taxonomy list
* @param {string} org Optional organization query param
* @returns {import('@tanstack/react-query').UseQueryResult<import("./types.mjs").TaxonomyListData>}
*/
const useTaxonomyListData = (org) => (
useQuery({
Expand Down

0 comments on commit 4bf6f0f

Please sign in to comment.