Sign In

@squawk/types

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons
This package has malicious versions linked to the ongoing "Mini Shai-Hulud" supply chain attack.

Affected versions:

0.8.10.8.20.8.3
+2 more
View campaign page

@squawk/types

Shared TypeScript type definitions for the @squawk aviation libraries

unpublished
Source
npmnpm
Version
0.8.5
Version published
Weekly downloads
196
115.38%
Maintainers
1
Weekly downloads
 
Created
Source

squawk logo  @squawk/types

MIT License npm TypeScript

Shared TypeScript type definitions used across multiple @squawk packages. Contains types for core domain models that cross the logic/data/build-script boundary: aircraft, position, airports, navaids, fixes, airways, procedures, airspace, and aircraft registration.

Domain-specific types that are produced and consumed by a single package live in that package instead:

  • Weather types (METAR, TAF, SIGMET, AIRMET, PIREP) are exported by @squawk/weather
  • NOTAM types (ICAO and FAA domestic) are exported by @squawk/notams

Documentation

Part of the @squawk aviation library suite. See all packages on npm.

Installation

npm install @squawk/types

Usage

import type { Aircraft, Position, Airport, Navaid, Fix } from '@squawk/types';

All types are re-exported from the package root. See the documentation for the full reference.

Exported types by domain

DomainTypes
Aircraft (ADS-B)Aircraft, AircraftCategory
PositionPosition, Coordinates
AirportAirport, Runway, RunwayEnd, IlsSystem, AirportFrequency, FacilityType, OwnershipType, FacilityUseType, FacilityStatus, SurfaceCondition, SurfaceTreatment, RunwayLighting, RunwayMarkingType, RunwayMarkingCondition, VgsiType, IlsCategory, IlsSystemType
NavaidNavaid, NavaidType, NavaidStatus
FixFix, FixUseCode, FixCompulsory, FixNavaidAssociation
AirwayAirway, AirwayWaypoint, AirwayType, AirwayRegion, AirwayWaypointType
AirspaceAirspaceFeature, AirspaceType, ArtccStratum, AltitudeBound, AltitudeReference
ProcedureProcedure, ProcedureType, ApproachType, ProcedureLeg, ProcedureLegPathTerminator, ProcedureLegFixCategory, ProcedureTransition, ProcedureCommonRoute, MissedApproachSequence, AltitudeConstraint, AltitudeConstraintDescriptor, SpeedConstraint, SpeedConstraintDescriptor, TurnDirection
Aircraft registrationAircraftRegistration, AircraftType, EngineType

The package also re-exports source-code lookup maps (FACILITY_TYPE_MAP, NAVAID_TYPE_MAP, AWY_TYPE_MAP, ATS_TYPE_MAP, AIRWAY_REGION_MAP, FIX_USE_CODE_MAP, FIX_COMPULSORY_MAP, NAVAID_STATUS_MAP, ILS_CATEGORY_MAP, ILS_SYSTEM_TYPE_MAP) used by the FAA NASR build pipelines to translate raw source-data values to the typed unions above. See the TypeDoc reference for full per-type signatures and field-level documentation.

Type guards

For the user-facing string-literal union types - the ones that flow in from URL params, config files, or MCP tool inputs - the package ships an is<Name> predicate paired with a <NAME>S const array as the single source of truth. Use the predicate to narrow an external string into the union without hand-rolling the membership list per consumer; use the const array as the value-side iteration target (e.g. building a lookup table keyed by the union):

import {
  AIRSPACE_TYPES,
  ARTCC_STRATA,
  FACILITY_TYPES,
  AIRWAY_TYPES,
  NAVAID_TYPES,
  FIX_USE_CODES,
  isAirspaceType,
  isArtccStratum,
  isFacilityType,
  isAirwayType,
  isNavaidType,
  isFixUseCode,
} from '@squawk/types';

const raw = new URLSearchParams(window.location.search).get('type') ?? '';
if (isAirspaceType(raw)) {
  // raw is now narrowed to AirspaceType
}

The arrays are branded with as const satisfies readonly <Type>[], so adding a new union member without updating the array fails the build.

Keywords

aviation

FAQs

Package last updated on 11 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts