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

{
  "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-declarations

tile.json