import ts from 'typescript' ; import { initializer } from './base' ; import * as utils from './utils' ; export function getQuestionToken ( node ) { return utils . getValueOrUndefined ( node . questionToken ) ; } export function getDotDotDotToken ( node ) { return utils . getValueOrUndefined ( node . dotDotDotToken ) ; } export function isRestParameter ( node ) { return getDotDotDotToken ( node ) !== undefined ; } export function isOptional ( node ) { return getQuestionToken ( node ) !== undefined || isRestParameter ( node ) || initializer . hasInitializer ( node ) ; }