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-1/

{
  "context": "This criteria evaluates how well the engineer uses the tns-platform-declarations package's memory management functions to properly release native object references and trigger garbage collection in a NativeScript application.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses __releaseNativeCounterpart",
      "description": "The releaseNativeObject function correctly uses __releaseNativeCounterpart() to release native object references",
      "max_score": 30
    },
    {
      "name": "Platform-specific GC",
      "description": "The triggerGarbageCollection function correctly uses gc() for Android and __collect() for iOS to trigger garbage collection",
      "max_score": 25
    },
    {
      "name": "Platform detection",
      "description": "The implementation correctly detects the current platform (Android vs iOS) to call the appropriate garbage collection function",
      "max_score": 15
    },
    {
      "name": "Batch processing logic",
      "description": "The batchCleanup function iterates through the array and calls __releaseNativeCounterpart() for each object",
      "max_score": 15
    },
    {
      "name": "GC after batch",
      "description": "The batchCleanup function calls the appropriate garbage collection function (gc() or __collect()) after releasing all objects",
      "max_score": 10
    },
    {
      "name": "Proper statistics tracking",
      "description": "The batchCleanup function correctly tracks and returns the count of successfully released objects",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

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

tile.json