I'm trying to write neovim lua plugin using teal programming language.
This is my project: https://github.com/linrongbin16/lsp-progress.nvim/tree/linrongbin16/tl
When execute make
, there's some error message unknown type
:
$ make
tl build
Wrote: lua/lsp-progress/defaults.lua
Wrote: lua/lsp-progress/logger.lua
Wrote: lua/lsp-progress/series.lua
========================================
1 warning:
teal/lsp-progress/logger.tl:76:1: redeclaration of function 'debug'
========================================
1 warning:
teal/lsp-progress/series.tl:28:30: SeriesRecordFormatter (of type SeriesRecordFormatterType | nil) is always a SeriesRecordFormatterType
========================================
1 warning:
teal/lsp-progress/client.tl:63:30: ClientRecordFormatter (of type nil | ClientRecordFormatterType) is always a ClientRecordFormatterType
========================================
13 errors:
teal/lsp-progress/client.tl:9:23: unknown type SeriesRecord
teal/lsp-progress/client.tl:33:48: unknown type SeriesRecord
teal/lsp-progress/client.tl:46:43: cannot index key 'formatted_result' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:49:32: cannot index key 'tostring' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:130:44: cannot index key 'title' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:130:58: cannot index key 'message' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:131:48: cannot index key 'title' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:131:62: cannot index key 'message' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:133:47: cannot index key 'title' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:133:61: cannot index key 'message' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:140:59: unknown type SeriesRecord
teal/lsp-progress/client.tl:141:36: cannot index key 'title' in invalid 'series' of type SeriesRecord
teal/lsp-progress/client.tl:141:50: cannot index key 'message' in invalid 'series' of type SeriesRecord
========================================
1 warning:
teal/lsp-progress.tl:161:33: unused argument err: {<any type> : <any type>}
========================================
51 errors:
teal/lsp-progress.tl:9:26: unknown type ClientRecord
teal/lsp-progress.tl:22:35: cannot use operator '..' for types string "doautocmd User " and <any type>
teal/lsp-progress.tl:23:41: argument 2: got <any type>, expected integer
teal/lsp-progress.tl:37:38: unknown type ClientRecord
teal/lsp-progress.tl:47:39: cannot index key 'new' in any 'ClientRecord' of type <any type>
teal/lsp-progress.tl:50:28: cannot index key 'tostring' in type ClientRecord
teal/lsp-progress.tl:73:19: cannot index key 'has_series' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:77:20: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:82:12: cannot index key 'increase_spin_index' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:85:27: cannot index key 'get_series' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:100:28: cannot index key 'has_series' in invalid 'client2' of type ClientRecord
teal/lsp-progress.tl:104:29: cannot index key 'tostring' in invalid 'client2' of type ClientRecord
teal/lsp-progress.tl:109:21: cannot index key 'remove_series' in invalid 'client2' of type ClientRecord
teal/lsp-progress.tl:113:25: cannot index key 'tostring' in invalid 'client2' of type ClientRecord
teal/lsp-progress.tl:115:24: cannot index key 'empty' in invalid 'client2' of type ClientRecord
teal/lsp-progress.tl:120:29: cannot index key 'tostring' in invalid 'client2' of type ClientRecord
teal/lsp-progress.tl:128:20: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:163:54: argument 1: got <any type>, expected integer
teal/lsp-progress.tl:167:21: argument 1: got <any type>, expected number
teal/lsp-progress.tl:172:31: argument 1: got <any type>, expected number
teal/lsp-progress.tl:173:14: cannot index key 'kind' in any 'value' of type <any type>
teal/lsp-progress.tl:175:37: cannot index key 'new' in any 'SeriesRecord' of type <any type>
teal/lsp-progress.tl:175:47: cannot index key 'title' in any 'value' of type <any type>
teal/lsp-progress.tl:175:60: cannot index key 'message' in any 'value' of type <any type>
teal/lsp-progress.tl:175:75: cannot index key 'percentage' in any 'value' of type <any type>
teal/lsp-progress.tl:176:16: cannot index key 'add_series' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:178:14: argument 1: got <any type>, expected number
teal/lsp-progress.tl:181:20: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:184:18: cannot index key 'kind' in any 'value' of type <any type>
teal/lsp-progress.tl:185:31: cannot index key 'get_series' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:187:33: cannot index key 'message' in any 'value' of type <any type>
teal/lsp-progress.tl:187:48: cannot index key 'percentage' in any 'value' of type <any type>
teal/lsp-progress.tl:188:20: cannot index key 'add_series' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:191:24: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:198:24: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:202:18: cannot index key 'kind' in any 'value' of type <any type>
teal/lsp-progress.tl:205:23: cannot index key 'kind' in any 'value' of type <any type>
teal/lsp-progress.tl:206:24: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:209:19: cannot index key 'has_series' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:210:35: cannot index key 'get_series' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:211:33: cannot index key 'message' in any 'value' of type <any type>
teal/lsp-progress.tl:212:20: cannot index key 'format' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:215:24: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:222:24: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:241:28: cannot index key 'formatted_result' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:246:24: cannot index key 'tostring' in invalid 'client' of type ClientRecord
teal/lsp-progress.tl:251:34: not a function: <any type>
teal/lsp-progress.tl:270:28: not a function: <any type>
teal/lsp-progress.tl:281:41: not a function: <any type>
teal/lsp-progress.tl:284:41: not a function: <any type>
teal/lsp-progress.tl:290:28: not a function: <any type>
make: *** [build] Error 1
But I don't know why it happens, would you please help me?