enum ErrorKind: byte { NoError = 0, // io errors NotFound, PermissionDenied, ConnectionRefused, ConnectionReset, ConnectionAborted, NotConnected, AddrInUse, AddrNotAvailable, BrokenPipe, AlreadyExists, WouldBlock, InvalidInput, InvalidData, TimedOut, Interrupted, WriteZero, Other, UnexpectedEof, BadResource, CommandFailed, // url errors EmptyHost, IdnaError, InvalidPort, InvalidIpv4Address, InvalidIpv6Address, InvalidDomainCharacter, RelativeUrlWithoutBase, RelativeUrlWithCannotBeABaseBase, SetHostOnCannotBeABaseUrl, Overflow, // hyper errors HttpUser, HttpClosed, HttpCanceled, HttpParse, HttpOther, TooLarge, // custom errors InvalidUri, InvalidSeekMode, OpNotAvailable, WorkerInitFailed, UnixError, NoAsyncSupport, NoSyncSupport, ImportMapError, InvalidPath, ImportPrefixMissing, UnsupportedFetchScheme, TooManyRedirects, // other kinds Diagnostic, JSError, } enum MediaType: byte { JavaScript = 0, TypeScript, Json, Unknown }