Platform-specific TypeScript declarations for NativeScript for accessing native objects
84
{
"context": "This evaluation assesses how well the engineer uses tns-platform-declarations package's primitive type conversion capabilities (float() and long() functions) when interfacing with Android's native SharedPreferences API. The focus is on proper type handling at the JavaScript-Java boundary.",
"type": "weighted_checklist",
"checklist": [
{
"name": "float() usage",
"description": "Uses the float() function from tns-platform-declarations to convert JavaScript numbers to Android float type when calling SharedPreferences.Editor.putFloat() method",
"max_score": 30
},
{
"name": "long() usage",
"description": "Uses the long() function from tns-platform-declarations to convert JavaScript numbers to Android long type when calling SharedPreferences.Editor.putLong() method",
"max_score": 30
},
{
"name": "SharedPreferences.getFloat() integration",
"description": "Correctly retrieves float values from SharedPreferences using getFloat() method with proper default value handling",
"max_score": 15
},
{
"name": "SharedPreferences.getLong() integration",
"description": "Correctly retrieves long values from SharedPreferences using getLong() method with proper default value handling",
"max_score": 15
},
{
"name": "Editor.commit() pattern",
"description": "Properly uses SharedPreferences.Editor workflow including obtaining editor, applying changes, and calling commit() or apply() to persist data",
"max_score": 10
}
]
}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