Skip to content

Commit

Permalink
Fixed some inaccuracies in the ParatextStandard expanded data provider (
Browse files Browse the repository at this point in the history
  • Loading branch information
tjcouch-sil authored Feb 2, 2024
2 parents dd0539c + c2a4941 commit 99c065a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions extensions/src/usfm-data-provider/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ declare module 'usfm-data-provider' {
IDataProvider,
MandatoryProjectDataType,
} from '@papi/core';
import { Unsubscriber } from 'platform-bible-utils';
import { UnsubscriberAsync } from 'platform-bible-utils';

export type UsfmProviderDataTypes = {
BookNames: DataProviderDataType<boolean, string[], never>;
Expand Down Expand Up @@ -139,7 +139,7 @@ declare module 'usfm-data-provider' {
verseRef: VerseRef,
callback: (usfm: string | undefined) => void,
options?: DataProviderSubscriberOptions,
): Unsubscriber;
): Promise<UnsubscriberAsync>;

/** Gets the "raw" USFM data for the specified chapter */
getChapterUSFM(verseRef: VerseRef): Promise<string | undefined>;
Expand All @@ -160,7 +160,7 @@ declare module 'usfm-data-provider' {
verseRef: VerseRef,
callback: (usfm: string | undefined) => void,
options?: DataProviderSubscriberOptions,
): Unsubscriber;
): Promise<UnsubscriberAsync>;

/** Gets the "raw" USFM data for the specified verse */
getVerseUSFM(verseRef: VerseRef): Promise<string | undefined>;
Expand All @@ -181,7 +181,7 @@ declare module 'usfm-data-provider' {
verseRef: VerseRef,
callback: (usfm: string | undefined) => void,
options?: DataProviderSubscriberOptions,
): Unsubscriber;
): Promise<UnsubscriberAsync>;

/** Gets the Scripture text in USX format for the specified chapter */
getChapterUSX(verseRef: VerseRef): Promise<string | undefined>;
Expand All @@ -202,7 +202,7 @@ declare module 'usfm-data-provider' {
verseRef: VerseRef,
callback: (usx: string | undefined) => void,
options?: DataProviderSubscriberOptions,
): Unsubscriber;
): Promise<UnsubscriberAsync>;

/**
* Gets the tokenized USJ data for the specified book
Expand Down Expand Up @@ -239,7 +239,7 @@ declare module 'usfm-data-provider' {
verseRef: VerseRef,
callback: (usj: USJDocument | undefined) => void,
options?: DataProviderSubscriberOptions,
): Unsubscriber;
): Promise<UnsubscriberAsync>;

/**
* Gets the tokenized USJ data for the specified chapter
Expand Down Expand Up @@ -276,7 +276,7 @@ declare module 'usfm-data-provider' {
verseRef: VerseRef,
callback: (usj: USJDocument | undefined) => void,
options?: DataProviderSubscriberOptions,
): Unsubscriber;
): Promise<UnsubscriberAsync>;

/**
* Gets the tokenized USJ data for the specified verse
Expand Down Expand Up @@ -313,7 +313,7 @@ declare module 'usfm-data-provider' {
verseRef: VerseRef,
callback: (usj: USJDocument | undefined) => void,
options?: DataProviderSubscriberOptions,
): Unsubscriber;
): Promise<UnsubscriberAsync>;

/**
* Gets an extension's serialized project data (so the extension can provide and manipulate its
Expand Down Expand Up @@ -356,8 +356,8 @@ declare module 'usfm-data-provider' {
dataScope: ExtensionDataScope,
callback: (extensionData: string | undefined) => void,
options?: DataProviderSubscriberOptions,
): Unsubscriber;
};
): Promise<UnsubscriberAsync>;
} & ParatextStandardProjectDataProvider;

export type ParatextStandardProjectDataProvider = IDataProvider<ParatextStandardProjectDataTypes>;
}
Expand Down

0 comments on commit 99c065a

Please sign in to comment.