blanche-toile.com/web/javascri...
via @akirao.bsky.social
#Web #Webdev #JavaScript #someMethod
blanche-toile.com/web/javascri...
via @akirao.bsky.social
#Web #Webdev #JavaScript #someMethod
ラッパー関数などがスタックトレースに含まれることでデバッグ時のノイズとなる問題を解決する。
`new Error(message, { framesAbove: someMethod })`のように指定… "" https://github.com/tc39/proposal-error-frames-above
ラッパー関数などがスタックトレースに含まれることでデバッグ時のノイズとなる問題を解決する。
`new Error(message, { framesAbove: someMethod })`のように指定… "" https://github.com/tc39/proposal-error-frames-above
Developer
I feel
Uncomfortable
When reading something like
"According to an engineer I talked to at WWDC, -someMethod is never ever called"
Developer
I feel
Uncomfortable
When reading something like
"According to an engineer I talked to at WWDC, -someMethod is never ever called"
blanche-toile.com/web/javascri...
#Web #Webdev #JavaScript #someMethod
blanche-toile.com/web/javascri...
#Web #Webdev #JavaScript #someMethod
```
func someMethod(int: Int) -> Bool {
print("inside someMethod")
int.isMultiple(of: 2)
}
```
work by extending the current “elide return” rule from one to two lines.
We […]
```
func someMethod(int: Int) -> Bool {
print("inside someMethod")
int.isMultiple(of: 2)
}
```
work by extending the current “elide return” rule from one to two lines.
We […]
Quick Swift Concurrency question: I was expecting the someMethod() to be called on the Main Thread because my class is MainActor annotated. It's not the case: is that because it's a synchronous function, so it's executed on the calling thread?
Thanks!
Quick Swift Concurrency question: I was expecting the someMethod() to be called on the Main Thread because my class is MainActor annotated. It's not the case: is that because it's a synchronous function, so it's executed on the calling thread?
Thanks!
Do you think this is a bad practice? If so, how can we avoid it? What would be some cases where this is justified?
Do you think this is a bad practice? If so, how can we avoid it? What would be some cases where this is justified?
This separates "framework" code from app code. Plus, it will now throw if you try to access something that does not exist in parents
You now use
`@parentMethod someMethod`
then `this.someMethod()`
#javascript #decorator #dev #dx #buildinpublic #webdev
This separates "framework" code from app code. Plus, it will now throw if you try to access something that does not exist in parents
You now use
`@parentMethod someMethod`
then `this.someMethod()`
#javascript #decorator #dev #dx #buildinpublic #webdev
this as Foo with public { someMethod }
this as Foo with public { someMethod }
foo as Foo with public { someMethod }
foo as Foo with public { someMethod }