@hypermode/modus-sdk-as
Advanced tools
Comparing version 0.15.0-alpha.1 to 0.15.0-alpha.2
@@ -77,3 +77,20 @@ /* | ||
idof<T>() === idof<Relationship>() || | ||
idof<T>() === idof<Path>() | ||
idof<T>() === idof<Path>() || | ||
idof<T>() === idof<DynamicMap>() || | ||
idof<T>() === idof<string[]>() || | ||
idof<T>() === idof<i8[]>() || | ||
idof<T>() === idof<i16[]>() || | ||
idof<T>() === idof<i32[]>() || | ||
idof<T>() === idof<i64[]>() || | ||
idof<T>() === idof<u8[]>() || | ||
idof<T>() === idof<u16[]>() || | ||
idof<T>() === idof<u32[]>() || | ||
idof<T>() === idof<u64[]>() || | ||
idof<T>() === idof<f32[]>() || | ||
idof<T>() === idof<f64[]>() || | ||
idof<T>() === idof<Date>() || | ||
idof<T>() === idof<JSON.Raw>() || | ||
idof<T>() === idof<JSON.Raw[]>() || | ||
idof<T>() === idof<Point2D>() || | ||
idof<T>() === idof<Point3D>() | ||
) { | ||
@@ -111,3 +128,12 @@ for (let i = 0; i < this.Keys.length; i++) { | ||
getProperty<T>(key: string): T { | ||
if (isInteger<T>() || isFloat<T>() || isBoolean<T>() || isString<T>()) { | ||
if ( | ||
isInteger<T>() || | ||
isFloat<T>() || | ||
isBoolean<T>() || | ||
isString<T>() || | ||
idof<T>() === idof<Date>() || | ||
idof<T>() === idof<JSON.Raw>() || | ||
idof<T>() === idof<Point2D>() || | ||
idof<T>() === idof<Point3D>() | ||
) { | ||
return this.Props.get<T>(key); | ||
@@ -154,1 +180,45 @@ } | ||
} | ||
@json | ||
export class Point2D { | ||
@alias("X") | ||
X!: f64; | ||
@alias("Y") | ||
Y!: f64; | ||
@alias("SpatialRefId") | ||
SpatialRefId!: u32; | ||
String(): string { | ||
return `Point{SpatialRefId=${this.SpatialRefId}, X=${this.X}, Y=${this.Y}}`; | ||
} | ||
} | ||
@json | ||
export class Point3D { | ||
@alias("X") | ||
X!: f64; | ||
@alias("Y") | ||
Y!: f64; | ||
@alias("Z") | ||
Z!: f64; | ||
@alias("SpatialRefId") | ||
SpatialRefId!: u32; | ||
String(): string { | ||
return `Point{SpatialRefId=${this.SpatialRefId}, X=${this.X}, Y=${this.Y}, Z=${this.Z}}`; | ||
} | ||
} |
{ | ||
"name": "@hypermode/modus-sdk-as", | ||
"version": "0.15.0-alpha.1", | ||
"version": "0.15.0-alpha.2", | ||
"repository": "github:hypermodeinc/modus", | ||
@@ -31,3 +31,3 @@ "description": "Modus SDK for AssemblyScript", | ||
"@types/eslint__js": "^8.42.3", | ||
"@types/node": "^22.10.1", | ||
"@types/node": "^22.10.2", | ||
"as-test": "^0.3.5", | ||
@@ -39,3 +39,3 @@ "assemblyscript": "^0.27.31", | ||
"typescript": "^5.7.2", | ||
"typescript-eslint": "^8.17.0", | ||
"typescript-eslint": "^8.18.0", | ||
"visitor-as": "^0.11.4" | ||
@@ -42,0 +42,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
162050
5183