Title: Query.where() does not accept boolean as per latest types definitions · Issue #43 · contentstack/contentstack-javascript · GitHub
Open Graph Title: Query.where() does not accept boolean as per latest types definitions · Issue #43 · contentstack/contentstack-javascript
X Title: Query.where() does not accept boolean as per latest types definitions · Issue #43 · contentstack/contentstack-javascript
Description: I have upgraded to 3.12.1 and the following Typescript code wouldn't compile: stack.ContentType('my_content').Query().where('is_hidden', false), This is due to this type definition: where(key: string, value: (string | number)): Query; Th...
Open Graph Description: I have upgraded to 3.12.1 and the following Typescript code wouldn't compile: stack.ContentType('my_content').Query().where('is_hidden', false), This is due to this type definition: where(key: stri...
X Description: I have upgraded to 3.12.1 and the following Typescript code wouldn't compile: stack.ContentType('my_content').Query().where('is_hidden', false), This is due to this type definit...
Opengraph URL: https://github.com/contentstack/contentstack-javascript/issues/43
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Query.where() does not accept boolean as per latest types definitions","articleBody":"I have upgraded to 3.12.1 and the following Typescript code wouldn't compile:\r\n\r\n```\r\nstack.ContentType('my_content').Query().where('is_hidden', false),\r\n```\r\n\r\nThis is due to this type definition:\r\n\r\n```\r\nwhere(key: string, value: (string | number)): Query;\r\n```\r\n\r\nThe type definitions that I am looking at are:\r\n```\r\n// Type definitions for contentstack 3.12.0\r\n// Project: https://www.contentstack.com/\r\n// Definitions by: Contentstack \u003chttps://github.com/contentstack\u003e\r\n```\r\n\r\nThe implementation in SDK doesn't really care and will be fine with `any`:\r\nhttps://github.com/contentstack/contentstack-javascript/blob/master/src/core/modules/query.js#L419\r\n\r\nI have to do this to \"trick\" Typescript compiler to believe my code\r\n\r\n```\r\ndeclare module 'contentstack' {\r\n interface Query {\r\n where(key: string, value: string | number | boolean): Query;\r\n }\r\n}\r\n```","author":{"url":"https://github.com/pveller","@type":"Person","name":"pveller"},"datePublished":"2021-01-29T15:45:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/43/contentstack-javascript/issues/43"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4ac09916-7f0c-f767-c478-62868f8f3e8e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B904:E65DA:20EFEAE:2C40AB6:6981C128 |
| html-safe-nonce | 8b53fdcb9ea93cd0f026986a3e18e57a1fb5868f82a1bb2557f8ab9a694fa605 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTA0OkU2NURBOjIwRUZFQUU6MkM0MEFCNjo2OTgxQzEyOCIsInZpc2l0b3JfaWQiOiIyNjMxNzAzMzk1MjA3MDY5OTkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 19e706bad3f008b2b4fefb86497da68257d8f78d380bc177633a78e573396109 |
| hovercard-subject-tag | issue:796984776 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/contentstack/contentstack-javascript/43/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4fe470b5a8e61990c87790140432712677927b479c4d6c98f8d673cfe92a23c2/contentstack/contentstack-javascript/issues/43 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4fe470b5a8e61990c87790140432712677927b479c4d6c98f8d673cfe92a23c2/contentstack/contentstack-javascript/issues/43 |
| og:image:alt | I have upgraded to 3.12.1 and the following Typescript code wouldn't compile: stack.ContentType('my_content').Query().where('is_hidden', false), This is due to this type definition: where(key: stri... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pveller |
| hostname | github.com |
| expected-hostname | github.com |
| None | e137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6 |
| turbo-cache-control | no-preview |
| go-import | github.com/contentstack/contentstack-javascript git https://github.com/contentstack/contentstack-javascript.git |
| octolytics-dimension-user_id | 24450751 |
| octolytics-dimension-user_login | contentstack |
| octolytics-dimension-repository_id | 76627300 |
| octolytics-dimension-repository_nwo | contentstack/contentstack-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 76627300 |
| octolytics-dimension-repository_network_root_nwo | contentstack/contentstack-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6be0b67eaa5007447f7efac54feabf8efa3e0840 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width