{"id":19069551,"url":"https://github.com/srect/typescript","last_synced_at":"2026-01-22T08:34:26.914Z","repository":{"id":114173152,"uuid":"154521787","full_name":"sRect/typescript","owner":"sRect","description":"typescript练习","archived":false,"fork":false,"pushed_at":"2024-06-17T05:42:10.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-15T17:50:54.421Z","etag":null,"topics":["typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sRect.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":"2018-10-24T15:08:20.000Z","updated_at":"2024-06-17T05:42:13.000Z","dependencies_parsed_at":"2024-06-06T03:23:23.347Z","dependency_job_id":"2af0edbe-eb42-47a2-afe2-be279c343631","html_url":"https://github.com/sRect/typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sRect/typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sRect%2Ftypescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sRect%2Ftypescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sRect%2Ftypescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sRect%2Ftypescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sRect","download_url":"https://codeload.github.com/sRect/typescript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sRect%2Ftypescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28659518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["typescript"],"created_at":"2024-11-09T01:14:44.940Z","updated_at":"2026-01-22T08:34:26.895Z","avatar_url":"https://github.com/sRect.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## TypeScript\n1. 变量的类型\n```javascript\n/**\n * 数据类型\n * Undefined :\n * Number:数值类型(NaN，Infinity，-Infinity);\n * string : 字符串类型;\n * Boolean: 布尔类型；\n * enum：枚举类型；\n * any : 任意类型，一个牛X的类型；\n * void：空类型；\n * Array : 数组类型;\n * Tuple : 元祖类型；\n * Null ：空类型\n */\nvar str: string = \"hello world\";\nconsole.log(str)\n\nvar num: number = NaN;\nvar num2: number = 18;\nvar num3: number = 175.5;\nconsole.log(num, num2, num3);\n\nenum MOBILE { xiaomi, huawei, vivo, oppo };\nenum REN { nan = \"男\", nv = \"女\", yao = \"妖\" }\nconsole.log(MOBILE.huawei)\nconsole.log(REN.nv)\n\nvar a: any = true;\na = 18;\na = \"hello\";\nconsole.log(a)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrect%2Ftypescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrect%2Ftypescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrect%2Ftypescript/lists"}