import ts from 'typescript' ; import * as node_ from '../node' ; import * as utils from '../utils' ; export type ParameteredNode = ts . Node & { readonly parameters : ts . NodeArray < ts . ParameterDeclaration > ; } ; export function getParameters ( node ) { return node . parameters ; } export function getParameter ( node , name ) { return getParameters ( node ) . find ( ( value ) => node_ . getName ( value ) === name ) ; } export function getParameterOrThrow ( node , name ) { return utils . throwIfNullOrUndefined ( getParameter ( node , name ) , 'parameter' ) ; }