Skip to content

Commit

Permalink
Fixed api-extractor warnings (medplum#3205)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyebberson authored Nov 2, 2023
1 parent 3e5401d commit 0506cd0
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ export interface MailAttachment {
* Compatible with nodemailer Mail.Options.
*/
export interface MailOptions {
/** The e-mail address of the sender. All e-mail addresses can be plain '[email protected]' or formatted 'Sender Name <[email protected]>' */
/** The e-mail address of the sender. All e-mail addresses can be plain `[email protected]` or formatted `Sender Name <[email protected]>` */
readonly from?: string | MailAddress;
/** An e-mail address that will appear on the Sender: field */
readonly sender?: string | MailAddress;
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/fhircast/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { OperationOutcomeError, validationError } from '../outcomes';

// We currently try to satisfy both STU2 and STU3. Where STU3 removes a resource / key from STU2, we leave it in as a valid key but don't require it.

const FHIRCAST_EVENT_NAMES = {
export const FHIRCAST_EVENT_NAMES = {
'patient-open': 'patient-open',
'patient-close': 'patient-close',
'imagingstudy-open': 'imagingstudy-open',
Expand All @@ -17,7 +17,7 @@ const FHIRCAST_EVENT_NAMES = {
syncerror: 'syncerror',
} as const;

const FHIRCAST_RESOURCE_TYPES = [
export const FHIRCAST_RESOURCE_TYPES = [
'Patient',
'Encounter',
'ImagingStudy',
Expand All @@ -28,14 +28,14 @@ const FHIRCAST_RESOURCE_TYPES = [
export type FhircastEventName = keyof typeof FHIRCAST_EVENT_NAMES;
export type FhircastResourceType = (typeof FHIRCAST_RESOURCE_TYPES)[number];

type FhircastEventContextDetails = {
export type FhircastEventContextDetails = {
resourceType: FhircastResourceType;
optional?: boolean; // NOTE: optional here is only referring to the schema, the spec often mentions that these are required if available as references for a given anchor resource
manyAllowed?: boolean;
};

// Key value pairs of { [FhircastEventName]: [required_resource1, required_resource2] }
const FHIRCAST_EVENT_RESOURCES = {
export const FHIRCAST_EVENT_RESOURCES = {
'patient-open': {
patient: { resourceType: 'Patient' },
/* STU2 only! `encounter` key removed in STU3 */
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/fhirpath/atoms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export class AndAtom extends BooleanInfixOperatorAtom {
* 6.5.2. or
* Returns false if both operands evaluate to false,
* true if either operand evaluates to true,
* and empty ({ }) otherwise:
* and empty (`{ }`) otherwise:
*/
export class OrAtom extends BooleanInfixOperatorAtom {
constructor(left: Atom, right: Atom) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function formatTimingRepeat(builder: string[], repeat: TimingRepeat | undefined)
* Returns a human-readable string for a FHIR Range datatype, taking into account one-sided ranges
* @param range - A FHIR Range element
* @param precision - Number of decimal places to display in the rendered quantity values
* @param exclusive - If true, one-sided ranges will be rendered with the '>' or '<' bounds rather than '>=' or '<='
* @param exclusive - If true, one-sided ranges will be rendered with the `>` or `<` bounds rather than `>=` or `<=`
* @returns A human-readable string representation of the Range
*/
export function formatRange(range: Range | undefined, precision?: number, exclusive = false): string {
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './access';
export * from './base64';
export * from './base-schema';
export * from './base64';
export * from './bundle';
export * from './cache';
export * from './client';
Expand All @@ -11,7 +11,9 @@ export * from './crypto';
export * from './eventtarget';
export * from './fhircast';
export * from './fhirlexer/parse';
export * from './fhirlexer/tokenize';
export * from './fhirmapper/parse';
export * from './fhirpath/atoms';
export * from './fhirpath/parse';
export * from './fhirpath/utils';
export * from './filter/parse';
Expand Down
2 changes: 1 addition & 1 deletion packages/fhir-router/src/fhirrouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type FhirResponse = [OperationOutcome] | [OperationOutcome, Resource];

export type FhirRouteHandler = (req: FhirRequest, repo: FhirRepository, router: FhirRouter) => Promise<FhirResponse>;

interface FhirOptions {
export interface FhirOptions {
introspectionEnabled?: boolean;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/mock/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class MockClient extends MedplumClient {
}
}

class MockFetchClient {
export class MockFetchClient {
initialized = false;
initPromise?: Promise<void>;

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/AppShell/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const useStyles = createStyles((theme) => ({
},
}));

interface HeaderProps {
export interface HeaderProps {
pathname?: string;
searchParams?: URLSearchParams;
headerSearchDisabled?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface ReferenceRangeEditorProps {
}

// Helper type that groups of qualified intervals by equal filter criteria
type IntervalGroup = {
export type IntervalGroup = {
id: string;
filters: Record<string, any>;
intervals: ObservationDefinitionQualifiedInterval[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { InternalSchemaElement } from '@medplum/core';
import React from 'react';
import { ResourcePropertyDisplay } from '../ResourcePropertyDisplay/ResourcePropertyDisplay';

interface ResourceArrayDisplayProps {
export interface ResourceArrayDisplayProps {
property: InternalSchemaElement;
values: any[];
arrayElement?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/ResourceArrayInput/ResourceArrayInput.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ActionIcon } from '@mantine/core';
import { InternalSchemaElement } from '@medplum/core';
import { IconCircleMinus, IconCirclePlus } from '@tabler/icons-react';
import React, { useRef, useState } from 'react';
import { ResourcePropertyInput } from '../ResourcePropertyInput/ResourcePropertyInput';
import { killEvent } from '../utils/dom';
import { InternalSchemaElement } from '@medplum/core';

interface ResourceArrayInputProps {
export interface ResourceArrayInputProps {
property: InternalSchemaElement;
name: string;
defaultValue?: any[];
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/SearchFieldEditor/SearchFieldEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Button, Modal } from '@mantine/core';
import { getDataType, getSearchParameters, InternalTypeSchema, SearchRequest, stringify } from '@medplum/core';
import { InternalTypeSchema, SearchRequest, getDataType, getSearchParameters, stringify } from '@medplum/core';
import { SearchParameter } from '@medplum/fhirtypes';
import React, { useEffect, useRef, useState } from 'react';
import { buildFieldNameString } from '../SearchControl/SearchUtils';

interface SearchFieldEditorProps {
export interface SearchFieldEditorProps {
visible: boolean;
search: SearchRequest;
onOk: (search: SearchRequest) => void;
Expand Down
7 changes: 4 additions & 3 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ export * from './AttachmentArrayInput/AttachmentArrayInput';
export * from './AttachmentButton/AttachmentButton';
export * from './AttachmentDisplay/AttachmentDisplay';
export * from './AttachmentInput/AttachmentInput';
export * from './auth/RegisterForm';
export * from './auth/SignInForm';
export * from './BackboneElementDisplay/BackboneElementDisplay';
export * from './BackboneElementInput/BackboneElementInput';
export * from './CalendarInput/CalendarInput';
export * from './CheckboxFormSection/CheckboxFormSection';
export * from './CodeInput/CodeInput';
export * from './CodeableConceptDisplay/CodeableConceptDisplay';
export * from './CodeableConceptInput/CodeableConceptInput';
export * from './CodeInput/CodeInput';
export * from './CodingDisplay/CodingDisplay';
export * from './CodingInput/CodingInput';
export * from './ContactDetailDisplay/ContactDetailDisplay';
Expand Down Expand Up @@ -81,13 +79,16 @@ export * from './ResourceTable/ResourceTable';
export * from './ResourceTimeline/ResourceTimeline';
export * from './Scheduler/Scheduler';
export * from './SearchControl/SearchControl';
export * from './SearchControl/SearchControlField';
export * from './SearchControl/SearchUtils';
export * from './SearchFieldEditor/SearchFieldEditor';
export * from './SearchFilterEditor/SearchFilterEditor';
export * from './ServiceRequestTimeline/ServiceRequestTimeline';
export * from './StatusBadge/StatusBadge';
export * from './Timeline/Timeline';
export * from './TimingInput/TimingInput';
export * from './auth/RegisterForm';
export * from './auth/SignInForm';
export * from './utils/date';
export * from './utils/outcomes';
export * from './utils/questionnaire';
Expand Down
8 changes: 7 additions & 1 deletion tsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
"tagName": "@category",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@yields",
"syntaxKind": "block",
"allowMultiple": false
}
],
"supportForTags": {
"@category": true
"@category": true,
"@yields": true
}
}

0 comments on commit 0506cd0

Please sign in to comment.