Wrong behavior of * operator in cli
See original GitHub issueGiven the following files:
./lib/types/ZnsResolutionType.ts:
interface CurrencyResolution {
address: string
}
export default interface ZnsResolutionType {
crypto: {
ADA?: CurrencyResolution,
BTC?: CurrencyResolution,
EOS?: CurrencyResolution,
ETH?: CurrencyResolution,
XLM?: CurrencyResolution,
XRP?: CurrencyResolution,
ZIL?: CurrencyResolution,
}
}
./lib/types/ResellerOrderType.ts
import ZnsResolutionType from './ZnsResolutionType'
interface OrderItem {
name: string;
owner: string;
resolution?: ZnsResolutionType;
}
export default interface ResellerOrderType {
domains: OrderItem[]
}
Running the following command results in an error:
$ typescript-json-schema lib/types/* ResellerOrderType
/Users/bogdan/.nvm/versions/node/v10.15.3/lib/node_modules/typescript-json-schema/dist/typescript-json-schema.js:795
throw new Error("type " + symbolName + " not found");
^
Error: type lib/types/ZnsResolutionType.ts not found
at JsonSchemaGenerator.getSchemaForSymbol (/Users/bogdan/.nvm/versions/node/v10.15.3/lib/node_modules/typescript-json-schema/dist/typescript-json-schema.js:795:19)
at generateSchema (/Users/bogdan/.nvm/versions/node/v10.15.3/lib/node_modules/typescript-json-schema/dist/typescript-json-schema.js:967:26)
at Object.exec (/Users/bogdan/.nvm/versions/node/v10.15.3/lib/node_modules/typescript-json-schema/dist/typescript-json-schema.js:1016:22)
at Object.run (/Users/bogdan/.nvm/versions/node/v10.15.3/lib/node_modules/typescript-json-schema/dist/typescript-json-schema-cli.js:48:30)
at Object.<anonymous> (/Users/bogdan/.nvm/versions/node/v10.15.3/lib/node_modules/typescript-json-schema/bin/typescript-json-schema:3:5)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
bash - Precedence of the shell logical operators
If a command is terminated by the control operator &, the shell executes the command in the background in a subshell. The shell...
Read more >Strange behaviour of += operator - help - Octave Discourse
Depending on the naming of variables and the space character after the += operator do I get errors: Example 1: name of variable...
Read more >bash: && operator behaviour - linux - Stack Overflow
The issue relates to the exit codes. The && operator will execute the second command if the first one indicates that it was...
Read more >Shell operator && seems to inhibit the normal stop-on-error ...
When a script line contains the operator && (on the top level), this inhibits the normal behaviour when the gitlab CI runner stops...
Read more >Unix's mysterious && and || | Network World
The reason for this behavior is tied to the Boolean nature of the operators. If a command runs successfully, the result is evaluated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, you can pass
*
(make sure to escape for your shell) as the types argument and pass your tsconfig instead of a file.I tried that and it seems to be close to what I want. The last problem I have is that
ZnsResolutionType
is set todefinitions.default
but notdefinitions.ZnsResolutionType
.It is weird that
ResellerOrderType
is exported correctly. Is it possible to defineZnsResolutionType
with the matching name but notdefault
?Here is the command I run:
And the output https://gist.github.com/9cc6a571284b561084d50329bb018811