Skip to content

Commit

Permalink
fix: return type of fountain generator
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleSound committed Oct 11, 2024
1 parent f8a4836 commit fb622f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/generate/src/base-generater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function createGeneraterWithRender<Result, RenderOptions>(createRender: C
/**
* Generate random encoded blocks that **never** ends
*/
*fountain(): Generator<Result> {
*fountain(): Generator<Result, never> {
while (true) {
_fountain ||= encoder.fountain()
const block = _fountain.next().value
Expand Down
2 changes: 1 addition & 1 deletion packages/luby-transform/src/encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class LtEncoder {
/**
* Generate random encoded blocks that **never** ends
*/
*fountain(): Generator<EncodedBlock> {
*fountain(): Generator<EncodedBlock, never> {
while (true) {
const degree = getRandomDegree(this.k)
const selectedIndices = getRandomIndices(this.k, degree)
Expand Down

0 comments on commit fb622f8

Please sign in to comment.