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

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -