Skip to content

0.6.0

Choose a tag to compare

@mozharovsky mozharovsky released this 07 Jul 14:39
· 58 commits to main since this release
2db07de

Added

  • Isa literals type the returns — project.add(Isa.fileReference, ...) is a FileReference, target.ensureBuildPhase(Isa.copyFilesBuildPhase, ...) is a CopyFilesBuildPhase, and target.findBuildPhase(Isa.shellScriptBuildPhase) is a ShellScriptBuildPhase | undefined, with no cast at the call site. A dynamic string falls back to the generic view types as before. The mapping is derived from the same VIEWS registry the view factory dispatches on, so the promised type and the created class cannot drift apart.
  • Exported IsaValue, BuildPhaseIsa, ViewByIsa, ViewOf, and BuildPhaseOf types for building typed helpers on top of the model.

Changed

  • ensureBuildPhase narrows its parameter from string to BuildPhaseIsa, the union of the eight build phase isas, so creating a phase with a non-phase isa is now a compile error. Code passing a plain string variable needs a literal or a narrowing check.

Full Changelog: 0.5.0...0.6.0