CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-tns-platform-declarations

Platform-specific TypeScript declarations for NativeScript for accessing native objects

84

1.23x
Overview
Eval results
Files

rubric.jsonevals/scenario-9/

{
  "context": "This criteria evaluates how well the engineer uses tns-platform-declarations' struct handling capabilities for iOS. The focus is on proper usage of CGRect struct type, initialization methods, property access, equality comparison, and struct copying/manipulation.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "CGRect struct usage",
      "description": "Uses CGRect (or equivalent iOS struct type) from tns-platform-declarations to represent rectangles rather than plain JavaScript objects.",
      "max_score": 25
    },
    {
      "name": "Struct initialization",
      "description": "Uses proper struct initialization methods (e.g., CGRectMake or struct constructor) to create rectangle instances with x, y, width, and height values.",
      "max_score": 20
    },
    {
      "name": "Property access",
      "description": "Accesses struct properties (origin.x, origin.y, size.width, size.height) correctly for calculations like area and bounds checking.",
      "max_score": 20
    },
    {
      "name": "Struct equality comparison",
      "description": "Uses proper struct equality comparison mechanism (CGRectEqualToRect or equivalent comparison method) rather than reference equality or manual field comparison.",
      "max_score": 20
    },
    {
      "name": "Struct copying/manipulation",
      "description": "Creates new struct instances when modifying rectangles (e.g., for scaling) rather than mutating existing structs, demonstrating understanding of struct value semantics.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-tns-platform-declarations

tile.json