Skip to content

Commit

Permalink
refactor: move iEvaluationOptions to private static EvaluationOptions.t
Browse files Browse the repository at this point in the history
  • Loading branch information
BinToss committed Aug 12, 2024
1 parent a9c8b16 commit b64a4c3
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/dotnet/MSBuildProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,20 @@ class MSBuildEvaluationOutput {
TargetResults?: typeof msbuildEvaluationOutput.infer.TargetResults;
}

const iEvaluationOptions = type(
{
FullName: "string",
SetProperties: type({ "[string]": "string" }),
Targets: "string[]",
GetItems: "string[]",
GetProperties: "string[]",
GetTargetResults: "string[]"
}
)

class EvaluationOptions {
constructor(opts: typeof iEvaluationOptions.infer) {
opts = iEvaluationOptions.assert(opts);
private static t = type(
{
FullName: "string",
SetProperties: type({ "[string]": "string" }),
Targets: "string[]",
GetItems: "string[]",
GetProperties: "string[]",
GetTargetResults: "string[]"
}
)

constructor(opts: typeof EvaluationOptions.t.infer) {
opts = EvaluationOptions.t.assert(opts);
this.FullName = opts.FullName;
this.Properties = opts.SetProperties;
this.GetItem = opts.GetItems;
Expand Down

0 comments on commit b64a4c3

Please sign in to comment.