fakoua / cowsay Goto Github PK
View Code? Open in Web Editor NEWConfigurable talking cow for Deno
License: MIT License
Configurable talking cow for Deno
License: MIT License
Default deno install gives these errors on running Cowsay.
No index signature with a parameter of type 'string' was found on type 'typeof import("https://deno.land/x/cowsay/src/balloon")'. return baloon[action](options.text, options.wrap ? options.wrapLength : null) + "\n" + cow(face);
Need to be able to define the import as { [key: string]: any }
I guess.
Perhaps there is some config in deno that can turn this check on/off.
Steps to reproduce
Windows 10
In terminal (e.g. Git Bash)
$ deno run https://deno.land/x/cowsay/cowsay.ts -t="Hello world"
Compile https://deno.land/x/cowsay/cowsay.ts
error: TS7053 [ERROR]: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'typeof import("https://deno.land/x/cowsay/src/balloon")'.
No index signature with a parameter of type 'string' was found on type 'typeof import("https://deno.land/x/cowsay/src/balloon")'.
return baloon[action](options.text, options.wrap ? options.wrapLength : null) + "\n" + cow(face);
~~~~~~~~~~~~~~
at https://deno.land/x/cowsay/mod.ts:34:9
TS7053 [ERROR]: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'typeof import("https://deno.land/x/cowsay/src/cows/cows")'.
No index signature with a parameter of type 'string' was found on type 'typeof import("https://deno.land/x/cowsay/src/cows/cows")'.
let text = cows[cow]
~~~~~~~~~
at https://deno.land/x/cowsay/src/cows.ts:5:13
TS7006 [ERROR]: Parameter 'options' implicitly has an 'any' type.
return function (options) {
~~~~~~~
at https://deno.land/x/cowsay/src/cows.ts:6:19
TS7006 [ERROR]: Parameter 'options' implicitly has an 'any' type.
export const faces = function (options): any {
~~~~~~~
at https://deno.land/x/cowsay/src/faces.ts:40:32
Found 4 errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.