-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix (typings): Upgrade to the latest version of 'egg-cookie' to fetch 'encrypted' in intellisense #2958
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2958 +/- ##
=======================================
Coverage 99.75% 99.75%
=======================================
Files 29 29
Lines 826 826
=======================================
Hits 824 824
Misses 2 2 Continue to review full report at Codecov.
|
cookies
property in Egg's Context
@whxaxes:Notice that I've referred the latest version of egg-cookies's index.d.ts. And this has exposed 'ctx', which isn't a must in 'egg' because we don't use something like 'this.ctx.cookies.ctx.……'. So I've created another interface as a wrapper to disclose the 'ctx' and expose ONLY get/set methods. Correct me if any suggestions :) |
need rebase |
'encrypted' in intellisense Ref: 1)eggjs/egg-cookies#12 2)eggjs/egg-cookies#11 3)#2949 In short: The Egg's cookie isn't inheriting from Koa's Context's cookie, we should rewrite it by adding 'encrypted' as the prop. Self-Link:#2958
@atian25 :OK. |
cc @dead-horse plz raise a release PR |
fix (typings): Upgrade to the latest version of 'egg-cookie' to fetch (#2958)
Context 接口使用 RemoveSpecProp 这个方式扩展后 (index.d.ts L685),tsserver 对 ctx 的补全就不包含 koa.Context 里面的字段了,改回之前的写法就没问题。请问可能是什么原因? |
@jsl9208 之前是没问题的,现在我刚试了一下好像真的有这种情况,我查一下原因,之后发个 PR 修复 |
找到原因了。。。最近 koa 的声明发了个版本,给 我今天想办法修复一下 |
@whxaxes 好的,多谢! |
land 2.14.2 hey, please retry after reinstall dependencies and please never lock it. $ # reinstall deps and never lock it.
$ rm -rf node_modules yarn.lock package-lock.json
$ npm i --no-package-lock |
Ref:
1)eggjs/egg-cookies#12
2)eggjs/egg-cookies#11
3)#2949
4)eggjs/egg-cookies#15
In short:
The Egg's cookie isn't inheriting from Koa's Context's cookie, we should rewrite it by adding 'encrypted' as the prop.
Self-Link:
#2958
npm test
passes