extends ___ = ___ syntax in typescript -


i saw syntax here

export interface actionreducer<t, v extends action = action> {   (state: t | undefined, action: v): t; } 

i confused syntax <t,v extends action = action>

i not find documentation syntax in typescript . can point me there . looks new syntax build not able recognize , gives me error :

node_modules/@ngrx/store/src/models.d.ts:6:52: ',' expected. 

generic parameter defaults

checked versions 1 , figured out added in version 2.3 specifies default type of v . v can either class extends action or if not mentioned of type action.

doc


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -