fork of hey-api/openapi-ts because I need some additional things
at feat/skip-token 22 lines 531 B view raw
1import type { PyNodeBase } from '../base'; 2import { PyNodeKind } from '../kinds'; 3 4export interface PyImportStatement extends PyNodeBase { 5 isFrom: boolean; 6 kind: PyNodeKind.ImportStatement; 7 module: string; 8 names?: ReadonlyArray<{ alias?: string; name: string }>; 9} 10 11export function createImportStatement( 12 module: string, 13 names?: ReadonlyArray<{ alias?: string; name: string }>, 14 isFrom: boolean = false, 15): PyImportStatement { 16 return { 17 isFrom, 18 kind: PyNodeKind.ImportStatement, 19 module, 20 names, 21 }; 22}