Let's say I have a model User.
I want to create a BehaviorSubject of type User as below:
private userSource = new BehaviorSubject<User>({});
Run Code Online (Sandbox Code Playgroud)
With this statement I'm getting the following error:
Argument of type '{}' is not assignable to parameter of type 'User'
Run Code Online (Sandbox Code Playgroud)
Could anyone help me how define a BehaviorSubject of type User