federicobond / solidity-parser-antlr

A Solidity parser for JS built on top of a robust ANTLR4 grammar
MIT License
155 stars 56 forks source link

type: ASTNode types have incorrect optional properties #63

Open yxliang01 opened 5 years ago

yxliang01 commented 5 years ago

There are some properties of ASTNode types declared as optional via adding ? to `PROPERTY_NAME (PROPERTY_NAME?). However, marking optional in this way results in saying such property having value TYPE | undefined | null while they are in fact of type TYPE | null (or correct me if wrong). e.g. https://github.com/federicobond/solidity-parser-antlr/blob/f0ef77034c467c06c383b621aa305093af3a0621/index.d.ts#L201

CC: @Leeleo3x

aoli-al commented 5 years ago

It is true. Will this introduce any side effect?

yxliang01 commented 5 years ago

I see. Side effect as in? @Leeleo3x