Skip to content

Type-safe callable functions with generics#1360

Open
SachinShekhar wants to merge 2 commits intofirebase:masterfrom
SachinShekhar:master
Open

Type-safe callable functions with generics#1360
SachinShekhar wants to merge 2 commits intofirebase:masterfrom
SachinShekhar:master

Conversation

@SachinShekhar
Copy link

Description

This PR adds stricter type safety to callable functions with generics.

Code sample

export const isValidSession = https.onCall<string, boolean>((data, context) => {
    const sessionId = data;
    // ...
    // ...
    return true;
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants