Platform-specific TypeScript declarations for NativeScript for accessing native objects
84
{
"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-declarationsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10