{"library":"rtts_assert","title":"rtts_assert","description":"A run-time type assertion library for JavaScript, used internally by Angular for runtime type checks. Current stable version is 2.0.0-alpha.37 (pre-release, adapted from v0.1.0 originally designed for Traceur). No regular release cadence—packaged within Angular monorepo. Key differentiator: provides runtime type checking akin to TypeScript's emitDecoratorMetadata, useful in testing and dynamic type validation. Lightweight with no runtime dependencies.","language":"javascript","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["npm install rtts_assert"],"cli":null},"imports":["import { assert } from 'rtts_assert';","assert.type(value, Type);","assert.define('MyType', function(value) { ... });"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { assert } from 'rtts_assert';\n\nassert.type('hello', String); // passes\nassert.type(42, String); // throws: Expected String, got Number.\n\nconst value = 'test';\nassert(value).is(String); // passes\nassert(value).is(Number); // throws\n\nassert.define('Email', function(value) {\n  assert(value).is(String);\n  if (value.indexOf('@') === -1) {\n    assert.fail('must contain @');\n  }\n});\n\nassert.type('user@example.com', Email); // passes\nassert.type('invalid', Email); // throws: must contain @","lang":"typescript","description":"Shows basic type assertion, value assertion, and custom type definition.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}