https://github.com/mrmurphy/elm-type-extractor
A small module to transform a string of Elm source into a list of type declarations.
https://github.com/mrmurphy/elm-type-extractor
Last synced: 4 months ago
JSON representation
A small module to transform a string of Elm source into a list of type declarations.
- Host: GitHub
- URL: https://github.com/mrmurphy/elm-type-extractor
- Owner: mrmurphy
- Created: 2016-01-08T04:37:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-08T04:41:56.000Z (over 10 years ago)
- Last Synced: 2026-01-14T05:33:38.615Z (5 months ago)
- Language: Elm
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Extract Types
This small module will take a string of Elm source, and extract all top-level type declarations.
For example, some source that looks like this:
```Elm
foo : String
foo = "Foo"
bar : Int -> Int
bar i = i + 1
```
Would return a list of type declarations, looking like this:
```Elm
[ {identifier = "foo", type' = "String"}
, {identifier = "bar", type' = "Int -> Int"}
]
```