;(value as any).__proto__ = arrayMethods Question point

This issue has been created since 2022-08-29.

What problem does this feature solve?

Looking at Observer today, I found a question

if (hasProto) {
/* eslint-disable no-proto /
;(value as any).proto = arrayMethods
/
eslint-enable no-proto */
} else {
for (let i = 0, l = arrayKeys.length; i < l; i++) {
const key = arrayKeys[i]
def(value, key, arrayMethods[key])
}
}
这里的;(value as any).proto = arrayMethods前面的“;”有什么特殊含义?

What does the proposed API look like?

if (hasProto) {
/* eslint-disable no-proto /
;(value as any).proto = arrayMethods
/
eslint-enable no-proto */
} else {
for (let i = 0, l = arrayKeys.length; i < l; i++) {
const key = arrayKeys[i]
def(value, key, arrayMethods[key])
}
}
这里的;(value as any).proto = arrayMethods前面的“;”有什么特殊含义?

sodatea wrote this answer on 2022-09-01

感谢关注,但是我们的 GitHub issues 只用于 Bug 反馈和特性请求,如果有使用上的问题建议到官方论坛DiscordStackOverflow 或其他问答网站上提问。

sodatea wrote this answer on 2022-09-01

无分号风格的写法会要求当 (, [, ` 出现在行首时必须在前面加一个 ;
参见:https://standardjs.com/rules-zhcn.html#%E5%85%B3%E4%BA%8E%E5%88%86%E5%8F%B7

xiaoxiaoyuanwang wrote this answer on 2022-09-01

@sodatea 谢谢大佬指点

More Details About Repo
Owner Name vuejs
Repo Name vue
Full Name vuejs/vue
Language TypeScript
Created Date 2013-07-29
Updated Date 2022-10-07
Star Count 199821
Watcher Count 6092
Fork Count 32893
Issue Count 587

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Sort albums and/or songs by most recent additions 1 2022-08-03 2022-10-02
"pip install pdoc3" fails because of "yanked" version of "setuptools-scm 6.2.0" 3 2021-09-01 2022-08-10
tpm2_eventlog: warning about not using PCR 8, 9, 14 when using sd-boot 0 2022-07-28 2022-08-21
Incorrect/unexpected permissions are returned from `ls -l` spec if the file is a symlink 8 2022-01-18 2022-08-13
proton-call checks for config before anything else, making --version and --help fail 2 2021-11-11 2022-08-02
我执行的时候 报一个 除0错误 是什么情况? 4 2021-06-27 2022-08-18
Translation Request 14 2021-11-08 2022-01-15
Spreading? 4 2021-11-08 2022-01-15
Downloader 1 2021-11-07 2022-01-15
Linear regression tutorial mixing 2 2022-04-14 2022-09-11
The unread message counter on the privateThreadsViewController cell not really reset.Its reset just on UI. How to reproduce So once you get in to chat some chat with unread messages and go back you will see that counter reset but if you close and reopen the app the counter will be there againa. 1 2022-01-12 2022-08-20
The Read Message Count is not Updated after apps kills and reopen 1 2022-01-12 2022-08-15
Namespace 'Electron.CrossProcessExports' has no exported member 'Remote'. 13 2021-10-02 2022-09-07
Tailwind should be a peer dep of the tailwind integration 0 2022-08-29 2022-09-04
suggestion: add description column to ability table 2 2016-04-27 2022-08-02
ServerCertificateValidatedEvent 3 2022-07-19 2022-10-02
doc.Find(selector-string) returns empty 3 2021-10-20 2022-09-17
init authstate with dictionary 0 2021-05-19 2022-09-23
Logout Flow - AlertView saying SIGN IN 14 2021-06-17 2022-09-23
Not able to clone version 1.4.0 when building flutter app 1 2021-05-17 2022-09-23
worker pod terminating too long after vcjob retry three times, with error FailedMount 4 2022-01-20 2022-09-24
Documentation for `cirq.Circuit.prev_moment_operating_on` is incorrect 1 2022-01-25 2022-08-06
generate mappers without the mapping register class 1 2021-09-13 2022-09-29
Payload / message should have an index 'notification' 1 2022-01-27 2022-09-25
[Minor][1.17.1 | #24] Logic Unit does not instantly update visually when adding/removing Logic Circuits 1 2021-10-01 2022-10-05
DL3022 false positives, where alias is defined in same Dockerfile 0 2022-01-07 2022-09-13
Dirty Lens not working 1 2021-11-14 2022-08-31
Unable to find elements from the last column after swiping to the right 8 2021-11-19 2022-09-13
Remove `PySwiftyRegex` 0 2021-10-13 2022-10-05
Failed to configure pod interface: timed out waiting for OVS port binding 0 2022-02-14 2022-09-18
Cronjob running every minute causes memory leak 1 2022-02-08 2022-08-14
usp_sqlwatch_internal_add_table - CI Collation With CS DB On Same Instance With "Dupe" Table Name 0 2021-09-11 2022-09-17
bug in CarEventSort.java 0 2021-01-22 2022-09-17
字符串查询使用占位符预处理机制绑定参数的时候,拼接sql语句有误 1 2021-06-04 2022-09-23
IMAP fails to connect to Office 365 with App Password 1 2022-09-01 2022-08-31
Mixed Precision: AttributeError: 'NoneType' object has no attribute 'lower' 3 2022-07-22 2022-10-07
utm ---> marketing_source, marketing_channel etc 0 2019-04-26 2022-09-30
[Feature Request] 希望书籍或者书籍分组能指定使用某一界面布局 1 2022-03-14 2022-09-22
useHitTest doesn't work 1 2021-03-05 2022-10-02
Learn Bash Scripting By Building Five Programs 2 2022-08-01 2022-08-01
cmd/go: go get return error if there is no func main() in the current working directory 3 2022-04-06 2022-09-08
Helper errors should be emitted to stdout as -f json events 1 2022-08-11 2022-09-25
when the model support dynamic batch ,the input shape [ -1,-1,80], how can warm up? because of the dynamic batch , I do know the warmup batchsize number ,can it use min_batchsize and max _batchsize to warmup? 1 2022-08-18 2022-09-16
Cant compile with recent versions of servant 4 2021-06-04 2022-09-27
feat(fetch): Support abort reasons in fetch 0 2021-12-16 2022-08-23
yarn install fails in github actions but it's ok in my local machine 1 2022-08-15 2022-09-23
implement extension substitution for gsub lookuptype 7 0 2021-03-01 2022-09-09
Bump pygments from 2.9.0 to 2.10.0 0 2021-08-16 2022-10-05
Support for automatic optimizations 4 2022-03-04 2022-09-19
NodeRestriction does not work as expected 10 2021-12-08 2022-09-30