Skip to content

improve: Add TailorDB file type definitions#91

Closed
ikawaha wants to merge 1 commit into
mainfrom
ikawaha/feat/tailordb-file-type_20250925
Closed

improve: Add TailorDB file type definitions#91
ikawaha wants to merge 1 commit into
mainfrom
ikawaha/feat/tailordb-file-type_20250925

Conversation

@ikawaha

@ikawaha ikawaha commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

tailordb file type の TypeScript 定義を追加しました。
見よう見まねで書いているので、ツッコミをお願いします 🙇

@ikawaha
ikawaha requested a review from a team as a code owner September 25, 2025 11:19
@ikawaha ikawaha self-assigned this Sep 26, 2025
@ikawaha ikawaha added the enhancement New feature or request label Sep 26, 2025
metadata: {
contentType: string;
fileSize: number;
}

@takumiyoshikawa takumiyoshikawa Sep 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[q]
fileのrecordはあるが、file uploadがまだされていない状態の時にundefiendは返りますか?あるいはdefaultの空文字やfilesize 0が帰りますか?あるいはerror?

/**
* File stream iterator for TailorDB file downloads
*/
interface TailordbFileStreamIterator {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AsyncIterableIterator という言語標準の型があるみたいです。value はanyになっていますがUint8Arrayに制約できるであっていますでしょうか?

interface TailordbFileStreamIterator extends AsyncIterableIterator<Uint8Array> {
  close(): Promise<void>;
}

sha256sum: string;
lastUploadedAt: string;
}>;
};

@takumiyoshikawa takumiyoshikawa Sep 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらもuploadしていない状況でのundefinedなどが返るかどうかが気になります

@ikawaha

ikawaha commented Sep 26, 2025

Copy link
Copy Markdown
Contributor Author

Closing this PR to revisit the API interface design. Will reopen or submit a new one after the revision.

@ikawaha ikawaha closed this Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants