{"id":23978265,"url":"https://github.com/yume190/typefill","last_synced_at":"2025-06-23T21:33:26.829Z","repository":{"id":52589932,"uuid":"211284413","full_name":"yume190/TypeFill","owner":"yume190","description":"A cli tool to fill your swift source code's types.","archived":false,"fork":false,"pushed_at":"2024-01-17T10:20:55.000Z","size":13007,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-14T23:45:46.309Z","etag":null,"topics":["mint","sourcekit","sourcekitten","spm","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/yume190.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-09-27T09:29:52.000Z","updated_at":"2024-08-28T05:11:34.000Z","dependencies_parsed_at":"2024-11-14T22:02:35.096Z","dependency_job_id":"57a3c7a2-5f60-47b1-844c-f7556009773c","html_url":"https://github.com/yume190/TypeFill","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yume190%2FTypeFill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yume190%2FTypeFill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yume190%2FTypeFill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yume190%2FTypeFill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yume190","download_url":"https://codeload.github.com/yume190/TypeFill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232844604,"owners_count":18585234,"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":["mint","sourcekit","sourcekitten","spm","swift"],"created_at":"2025-01-07T08:17:39.198Z","updated_at":"2025-01-07T08:17:39.806Z","avatar_url":"https://github.com/yume190.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeFill\n\n[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=yume190_TypeFill)](https://sonarcloud.io/dashboard?id=yume190_TypeFill)\n![Swift](https://github.com/yume190/TypeFill/workflows/Swift/badge.svg)\n\n----\n\n![](gif/rxswift2.gif)\n\nA little cli tool to help you fill your `variables type`.\n\n~~And add `private final` attribute to `@IBAction`, `@IBOutlet`, and `@objc`.(Rewriting ...)~~\n\n## Installation\n\n---\n\n### make\n\n``` sh\nbrew install make\nmake install\n```\n\n### Swift Package Manager\n\n``` sh\nswift build -c release\ncp .build/release/typefill /usr/local/bin\n```\n\n### mint\n\n``` sh\nbrew install mint\nmint install yume190/TypeFill\n```\n\n### Usage\n\n``` sh\ntypefill single    --sdk macosx         --file PATH/TO/sample.swift \n\ntypefill spm       --module TypeFillKit --file .       \ntypefill project   --module YOUR_SCHEME --file PATH/TO/YOUR.xcodeproj \ntypefill workspace --module YOUR_SCHEME --file PATH/TO/YOUR.xcworkspace\n```\n\n## The Support Part \u0026 Todolist\n\n- [x] typefill variables like `let a = 1` or `var a = \"1\"`.\n- [x] typefill keyword like `let ``default`` = 1`.\n- [x] typefill `guard let` and `if let`.\n- [x] typefill some closure input.\n    - `{ a, b in }`\n    - `{ (a, b) in }`\n- [x] typefill binding tuple `let (aa, bb) = (1, 2)`\n- [ ] typefill `inout` \n- [ ] typefill closure output.\n- [ ] ~~add `private final` attribute to `@IBAction/@IBOutlet/@objc` by using `--ibaction/--iboutlet/--objc`.(Rewriting)~~\n\n``` swift\nprivate lazy var chartHeight: [CGFloat] = {\n    return self.status.sensorData?.compactMap { sensor -\u003e CGFloat in\n        guard let _chartType = sensor.chart?.type else { return 0 }\n    }\n}()\n```\n\n## Support\n\n### let/var\n\n``` swift\nlet a = 1\nvar b = a\nlet (c, d) = (1, 2)\nstruct Test {\n    let a, b: Int\n    let c = 1, d = 2\n}\n```\n\n``` swift\nlet a: Int = 1\nvar b: Int = a\nlet (c, d): (Int, Int) = (1, 2)\nstruct Test {\n    let a: Int, b: Int\n    let c: Int = 1, d: Int = 2\n}\n```\n\n### Option bind(`if let`/`guard let`)\n\n``` swift\nlet a: Int? = nil\nif let aa = a {}\nguard let aa = a else {return}\n```\n\n``` swift\nlet a: Int? = nil\nif let aa: Int = a {}\nguard let aa: Int = a else {return}\n```\n\n### Closure\n\n``` swift\nlet a: (Int, Int) -\u003e String = { a, b -\u003e String in\n    return \"\"\n}\nlet b: (Int, Int) -\u003e String = { (a, b) -\u003e String in\n    return \"\"\n}\n```\n\n``` swift\nlet a: (Int, Int) -\u003e String = { (a: Int, b: Int) -\u003e String in\n    return \"\"\n}\nlet b: (Int, Int) -\u003e String = { (a: Int, b: Int) -\u003e String in\n    return \"\"\n}\n```\n\n\n## Not Support\n\n### Closure(`inout`)\n\n``` swift\nlet a: (inout Int) -\u003e Int = { i in\n    return i\n}\n```\n\n## Ref\n\n * [AST Explorer](https://swift-ast-explorer.com/)\n * [SourceKitten](https://github.com/jpsim/SourceKitten/tree/swift-5.1)\n * [SwiftSupport](https://github.com/apple/swift/blob/master/tools/SourceKit/docs/SwiftSupport.txt)\n * [Protocol](https://github.com/apple/swift/blob/master/tools/SourceKit/docs/Protocol.md)\n * [Accessors](https://github.com/apple/swift/blob/2c9def8e74ede41f09c431dab5422bb0f8cc6adb/tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp#L1101-L1105)\n * [Attributes](https://github.com/apple/swift/blob/0a92b1cda36706b5e0bd30c172a24391aa524309/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp#L65-L81)\n\n## License\n\nMIT licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyume190%2Ftypefill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyume190%2Ftypefill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyume190%2Ftypefill/lists"}