{"id":22208284,"url":"https://github.com/steenhansen/type-czech-canonical","last_synced_at":"2025-03-25T04:36:10.076Z","repository":{"id":149760034,"uuid":"498119110","full_name":"steenhansen/type-czech-canonical","owner":"steenhansen","description":"https://type-czech-canonical.onrender.com","archived":false,"fork":false,"pushed_at":"2024-01-09T00:08:50.000Z","size":568,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-30T04:42:37.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steenhansen.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-30T22:58:54.000Z","updated_at":"2023-03-01T17:17:02.000Z","dependencies_parsed_at":"2024-01-09T02:27:56.229Z","dependency_job_id":null,"html_url":"https://github.com/steenhansen/type-czech-canonical","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steenhansen%2Ftype-czech-canonical","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steenhansen%2Ftype-czech-canonical/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steenhansen%2Ftype-czech-canonical/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steenhansen%2Ftype-czech-canonical/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steenhansen","download_url":"https://codeload.github.com/steenhansen/type-czech-canonical/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245401372,"owners_count":20609163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T19:17:22.594Z","updated_at":"2025-03-25T04:36:10.035Z","avatar_url":"https://github.com/steenhansen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003ca id=\"fast-start\"\u003e\u003c/a\u003e\n\n# Type-Czech-Canonical\n\nThis is a barebones example of [Type-Czech](https://github.com/steenhansen/type-czech#fast-start) JavaScript runtime type checking with React SSR on NodeJs.\n\n\nThis example is live on Render.com as a slow to start, free hosted site that takes 30-180 seconds to resume [https://type-czech-canonical.onrender.com/](https://type-czech-canonical.onrender.com/). \nIt exists to show how easy it is to add runtime type checking to an SSR Javascript project. \nThe live version has TypeCzech turned on, with an illustrative type error in a JSX component erroring to both NodeJs and the browser.\nThe initial counter is an erroneous string of \"1\" instead of the correct number of 1, which causes the incorrect output of \"Counter 111111...\"\nwhen the counter button is pressed, instead of the wanted 'Counter 1', 'Counter 2' ...\n\nThis sample project is based on the [Vite-Plugin-SSR](https://vite-plugin-ssr.com/).\n\n## To install\n  - npm install\n\n## Run type-czech-canonical\nTo run the program with TypeCzech on, logging errors, with a large developer Type-Czech file\n  - npm run dev\n  - http://localhost:3000/\n\nTo run the program with TypeCzech off, ignoring errors, with a tiny production Type-Czech file\n  - npm run prod\n  - http://localhost:3000/\n\n\n\n\n\n\n\n## Type Error Messages When TypeCzech Turned On\n\n### Node.js Runtime Type Error\n```\nMESSAGE Property 'init_count' is indicated to be a 'number', but is inaccurately a 'string' : 1\n        Node.js : PRE_CounterInc :{ init_count: 'number' }\n        CHECKER check_assert()\n    ACTUAL TYPE 'string'\n         VALUES \"\"\n         ORIGIN\n```\n\n### Broswer Runtime Type Error in Console\n```\nPRE_JSX_Counter() PRE-FUNC: Property 'init_count' is indicated to be a 'number', \n                            but is inaccurately a 'string' : 1\n            CHECKER checkParam_typeExtra()\n        ACTUAL TYPE ['object','object']\n             VALUES {init_count:\"1\"},{}\n      EXPECTED TYPE [{\"init_count\":\"number\"},\"object\"]\n             ORIGIN Counter(Counter_props, _react_obj_1, _react_obj_2)\n```\n\n## Free Hosting on render.com\n\nCreate as a \"Web Service\" with a \"Node\" runtime.\n\n\tSettings\n\t\tBuild Command\t$ yarn; yarn build\n\n\t\tStart Command\t$ node ./server\n\nMust also delete package-lock.json as it was generated by NPM as this project uses, not by Yarn which Render.com uses.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteenhansen%2Ftype-czech-canonical","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteenhansen%2Ftype-czech-canonical","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteenhansen%2Ftype-czech-canonical/lists"}