import type * as ts from 'typescript' ; import { Scope } from '../../scope/scope' ; import { GetDescriptor } from '../descriptor' ; import { createArrayLiteral } from '../../../typescriptFactory/typescriptFactory' ; export function GetTupleDescriptor ( node , scope ) { return createArrayLiteral ( getDescriptorFromTypeNodes ( ( ( node as any ) . elementTypes as ts . NodeArray < ts . TypeNode > ) || ( ( node as any ) . elements as ts . NodeArray < ts . TypeNode > ) , scope ) ) ; } function getDescriptorFromTypeNodes ( nodes , scope ) { return nodes . map ( ( e ) => GetDescriptor ( e , scope ) ) ; }