Static Methodswift-package-manager 6.0.3PackageModelSyntax
addTarget(_:to:configuration:installedSwiftPMConfiguration:)
Add the given target to the manifest, producing a set of edit results that updates the manifest and adds some source files to stub out the new target.
static func addTarget(_ target: TargetDescription, to manifest: SourceFileSyntax, configuration: Configuration = .init(), installedSwiftPMConfiguration: InstalledSwiftPMConfiguration = .default) throws -> PackageEditResult