Comments (5)
node_modules/jasmine-mock-factory/src/lib/index.ts:82:41 - error TS2345: Argument of type 'keyof T' is not assignable to parameter of type 'string'.
Type 'string | number | symbol' is not assignable to type 'string'.
Type 'number' is not assignable to type 'string'.
82 this.ensureProperty(propertyName);
~~~~~~~~~~~~
node_modules/jasmine-mock-factory/src/lib/index.ts:85:41 - error TS2345: Argument of type 'keyof T' is not assignable to parameter of type 'string'.
85 this.ensureFunction(propertyName);
~~~~~~~~~~~~
node_modules/jasmine-mock-factory/src/lib/index.ts:92:37 - error TS2345: Argument of type 'keyof T' is not assignable to parameter of type 'string'.
92 this.ensureProperty(propertyName);
~~~~~~~~~~~~
from jasmine-mock-factory.
from jasmine-mock-factory.
Thank you @Wardrium for the report and @unlight for looking into it. I'm working on a fix.
from jasmine-mock-factory.
done! 2.1.0 release should get this patched. Let me know if you still see any errors after the update.
Thank you!
from jasmine-mock-factory.
I also noticed michael-silva forked the library and fixed the issue with a slightly different approach. Kudos to the community!
That fork should prevent the ts compiler error but didn't address the root cause. If someone actually uses a symbol as the property name, the test will break. My fix added the error checking and warning message when symbols are used.
from jasmine-mock-factory.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasmine-mock-factory.