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.
Comments
Post a Comment