« first day (4484 days earlier)      last day (467 days later) » 

2:17 AM
posted on January 25, 2023 by Cole Brown

The Beta channel is being updated to OS version: 15278.41.0, Browser version: 110.0.5464.46 for most ChromeOS devices. If you find new issues, please let us know one of the following ways: File a bugVisit our ChromeOS communitiesGeneral: Chromebook Help CommunityBeta Specific: ChromeOS Beta Help CommunityReport an issue or send feedback on ChromeInterested in switching channels? Find out

 
2:56 AM
What is the signature of `foo()` to allow it to be called in 3 ways?

```ts
foo( (x) => console.log(x) );

foo({ f(x) { console.log(x); } });

foo({ f: (x) => console.log(x) });
```



Any idea?
The last message was posted 10 centuries ago.
 
 
6 hours later…
9:15 AM
interface MyCallback {
  (x: any): void
}

interface Foo {
  (cb: MyCallback): void;
  (obj: { f: MyCallback}): void
}
@TheRealMasochist ^ Playground Link
You either call the function with a callback or with an object which has a method with the same signature. It's only two calls - the last two are basically the same.
 
 
1 hour later…
10:38 AM
people in my team is kind of debating if we should write a new nodejs project in typescript or js? Thoughts? Flame wars? Anyone?
 
 
2 hours later…
12:41 PM
const Input=({name,error,label,...rest})=>{
    return (
        <div className='form-group'>
            <label htmlFor={name}>{label}</label>
            <input {...rest} name={name} id={name} htmlFor={name} className='form-control' />
            {error && <div className='alert alert-danger'>{error}</div>}
        </div>
    )
}
 
@Aladdin Please don't post unformatted code - use the up arrow to edit your post, then hit Ctrl + K to format the code in that post. See the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
 
can someone tell me what the {...rest} stuff is doing in here?Is it another way of naming the fields in the input tag
 
1:11 PM
|| mdn rest syntax
 
Oh, sorry, you meant the other one.
|| mdn spread syntax
 
It's mostly the same in JSX.
If rest = { a:1, b:2 } then for <div {...rest}> you get <div a=1 b=2>
 
 
2 hours later…
3:30 PM
ohh i didn't know that.Thanks a lot
 
I occasionally find myself doing this in vue in order to get vuelidate to re-examine a property, but I'm 100% convinced there's a 1-line equivalent because I've seen it before. But I can't for the life of me remember what it is - does anyone know?

var initialAllocation = this.application.sell.allocations[0].amountAllocation;
this.application.sell.allocations[0].amountAllocation = null;
this.application.sell.allocations[0].amountAllocation = initialAllocation;
 
3:50 PM
@BobTway Not an one liner of this. If you need to do two assignments to the same thing, that can't really work in one line/expression. Well, you can do an assignment to an IIFE and another assignment in the IIFE, I guess, then remove all newlines from this. But it's still going to be several operations, just uglier.
You can do one assignment to two things like a = b = 42
But what you want is a = a = null which can't really work correctly.
If you really need to do this often, why not write a function?
function reassign(obj, prop) {
	var initial = obj[prop];
	obj[prop] = null;
	obj[prop] = initial;
}

reassign(this.application.sell.allocations[0], "amountAllocation");
 
4:06 PM
@VLAZ nice, thanks. I always hope to avoid doing it so I've not bothered with an fn before but you're right, that's much neater given there are several instances of it around
 
hmm.
i've not heard the idea of avoiding functions before
usually the goal is the opposite
often to absurd levels
 
4:41 PM
posted on January 25, 2023 by Daniel Yip

The Chrome team is excited to announce the promotion of Chrome 110 to the Beta channel for Windows, Mac and Linux. Chrome 110.0.5481.52 contains our usual under-the-hood performance and stability tweaks, but there are also some cool new features to explore - please head to the Chromium blog to learn more! A full list of changes in this build is available in the log. Interested in switching

 
 
1 hour later…
5:53 PM
One interesting question
is it possible to skip second prop for example ?
An example
export const parseRequestDateAndTime = (
  dateTime: DateTime,
  fromFormat = RequestDateFormat.YYYY_M_DD,
  format = DisplayDateFormat.DD_MM_YYYY,
) => parse(dateTime, fromFormat, format)
Is it possible to skip fromFormat in this specific case ?
something like - parseRequestDateAndTime(date, SKIP THIS, format)
 
@MileMijatović Yes, by passing undefined then the default will be used.
||> const fn1 = (a, b = 2, c = 3) => console.log(a, b, c)
fn1(1, undefined, 7);
 
@VLAZ undefined Logged: [ '1', '2', '7' ] Took: 0ms
 
With that said, I would not recommend doing that. It leads to an API which is annoying to follow. You can make pseudo-named arguments by passing in an object with properties. Then you can more easily omit some and even change the order:
||> const fn2 = ({a, b = 2, c = 3}) => console.log(a, b, c);
fn2({c: 7, a: 1});
 
@VLAZ undefined Logged: [ '1', '2', '7' ] Took: 0ms
 
6:40 PM
Thank you
 
 
1 hour later…
7:47 PM
posted on January 25, 2023 by Ben Mason

Hi everyone! We've just released Chrome Beta 110 (110.0.5481.50) for Android. It's now available on Google Play. You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here. If you find a new issue, please let us know by filing a bug. Krishna Govind Google Chrome

 
8:02 PM
 
8:45 PM
@VLAZ Excellent. Thank you very much!!!
 
9:11 PM
If I return { firstName, lastName } from method
how to get that value later ?
export const getSelectedYearPeriod = (
  year: string,
  format = DisplayDateFormat.DD_MM_YYYY,
) => {
  const selectedYear = +year
  const yearStart = convertToDate(selectedYear, DisplayDateFormat.YEAR)
    .startOf('year')
    .format(format)
  const yearEnd = convertToDate(selectedYear, DisplayDateFormat.YEAR)
    .endOf('year')
    .format(format)

  return { yearStart, yearEnd }
}
how to use yearStart and yearEnd later ?
getSelectedYearPeriod(year).yearStart ?
But this is not working
ypeError: (0 , framework_date_time__WEBPACK_IMPORTED_MODULE_29_.getSelectedYearPeriod) is not a function
 
 
1 hour later…
10:23 PM
posted on January 25, 2023 by Ben Mason

Hi everyone! We've just released Chrome Beta 110 (110.0.5481.52) for iOS; it'll become available on App Store in the next few days. You can see a partial list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Harry Souders Google Chrome

 

« first day (4484 days earlier)      last day (467 days later) »