Repository navigation
0.6.0
Added
- Isa literals type the returns —
project.add(Isa.fileReference, ...)is aFileReference,target.ensureBuildPhase(Isa.copyFilesBuildPhase, ...)is aCopyFilesBuildPhase, andtarget.findBuildPhase(Isa.shellScriptBuildPhase)is aShellScriptBuildPhase | 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 sameVIEWSregistry the view factory dispatches on, so the promised type and the created class cannot drift apart. - Exported
IsaValue,BuildPhaseIsa,ViewByIsa,ViewOf, andBuildPhaseOftypes for building typed helpers on top of the model.
Changed
ensureBuildPhasenarrows its parameter fromstringtoBuildPhaseIsa, 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 plainstringvariable needs a literal or a narrowing check.
Full Changelog: 0.5.0...0.6.0