react-xapi-wrapper
Version:
`react-xapi-wrapper` is a library for automating the process of creating and sending xAPI statements within React environments.
17 lines (16 loc) • 469 B
TypeScript
import { Actor } from '@xapi/xapi';
/**
* The type definition of ActorProps.
* Used to define the structure of the props for the getActor function.
*/
export type ActorProps = {
userID: string;
};
/**
* The getActor function.
* Creates the actor part of an xAPI statement.
*
* @param userID - The ID of the current user.
* @returns A new instance of the actor part of an xAPI statement.
*/
export declare const getActor: ({ userID }: ActorProps) => Actor;