chriskrycho

chriskrycho

Husband and dad; theologian, composer, poet, essayist; front end infrastructure (@emberjs and TypeScript) at @linkedin; @rust-lang enthusiast.

Member Since 9 years ago

@LinkedIn, Monument, Colorado

Experience Points
334
follower
Lessons Completed
29
follow
Lessons Completed
65
stars
Best Reply Awards
175
repos

2422 contributions in the last year

Pinned
⚡ A library for safer and smarter error- and "nothing"-handling in TypeScript.
⚡ Use TypeScript in your Ember.js apps!
⚡ The fifth version of chriskrycho.com, built in Eleventy.
⚡ Volta: JS Toolchains as Code. ⚡
⚡ The official website for the New Rustacean podcast
⚡ An autotracked implementation of a ring-buffer-backed double-ended queue
Activity
Jan
24
7 hours ago
push

chriskrycho push chriskrycho/v5.chriskrycho.com

chriskrycho
chriskrycho

Journal: my old notes on exposure notifications

Also an abbr title attribute on an old post which referenced COVID.

commit sha: f605e05470f16c84550eff7b2d46870a4ab1e288

push time in 6 hours ago
Jan
23
1 day ago
push

chriskrycho push chriskrycho/v5.chriskrycho.com

chriskrycho
chriskrycho

Library/Reading List: finished 'The Great Hunt' again

commit sha: 6b424eaa6deb0c28117a630a75e3b561343cfa04

push time in 12 hours ago
pull request

chriskrycho merge to typed-ember/ember-cli-typescript

chriskrycho
chriskrycho

Fix typef of `locationType`

In fresh apps, previously, we'd start with a TS error, which crashes ember-cli atm, due to an ember-cli issue.

push

chriskrycho push chriskrycho/v5.chriskrycho.com

chriskrycho
chriskrycho

config: tweaking TS

Mostly using this to experiment with Sublime again

[skip netlify]

commit sha: d0fa287362ff15ca437d7dc6b7253bcf996a1a78

push time in 14 hours ago
push

chriskrycho push chriskrycho/v5.chriskrycho.com

chriskrycho
chriskrycho

Journal: another incomplete paragraph

commit sha: fb92f31c41cbcd13a6ca6ff867edf5569c8f37d4

push time in 14 hours ago
push

chriskrycho push chriskrycho/v5.chriskrycho.com

chriskrycho
chriskrycho

Journal: whoops, missed finishing a paragraph

Because of course I did.

commit sha: bbd66a661f4e6cbf4a7619e03e918ff4b22bfa6d

push time in 1 day ago
push

chriskrycho push chriskrycho/ember-blog

chriskrycho
chriskrycho

blog: add note on lock files and new author

commit sha: f200829f555cc3010b559d24505a708e01344cea

push time in 1 day ago
Jan
21
3 days ago
Activity icon
issue

chriskrycho issue comment emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho

Meant to say on the review: thank you for doing this! 💙

open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
expectTypeOf(arr.compact()).toEqualTypeOf<NativeArray<Foo>>();
expectTypeOf(A([foo, null]).compact()).toEqualTypeOf<NativeArray<Foo>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
expectTypeOf(arr.filterBy('bar')).toEqualTypeOf<NativeArray<Foo>>();
expectTypeOf(arr.filterBy('missing')).toEqualTypeOf<NativeArray<Foo>>();

expectTypeOf(arr.rejectBy('bar')).toEqualTypeOf<NativeArray<Foo>>();
expectTypeOf(arr.rejectBy('missing')).toEqualTypeOf<NativeArray<Foo>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
expectTypeOf(makeArray(arr)).toEqualTypeOf<NativeArray<Foo>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
expectTypeOf(rejected).toEqualTypeOf<NativeArray<Foo>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho

As with the others, does it work with toMatchTypeOf?

expectTypeOf(arr.sortBy('bar')).toMatchTypeOf<NativeArray<Foo>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
expectTypeOf(arr.invoke('missing')).toEqualTypeOf<NativeArray<unknown>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
  compact(): NativeArray<Exclude<T, null>>;
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho

I think we might be able to do toMatchTypeOf?

expectTypeOf(mapped).toMatchTypeOf<NativeArray<number>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
export { Array as default, NativeArray, isArray, A } from '@ember/-internals/runtime';
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
expectTypeOf(filtered).toMatchTypeOf<NativeArray<Foo>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
  uniqBy(key: string): NativeArray<T>;
  without(value: T): NativeArray<T>;
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
let proxy = ArrayProxy.create({ content }) as ArrayProxy<Foo, NativeArray<Foo>>;
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
expectTypeOf(arr.uniq()).toEqualTypeOf<NativeArray<Foo>>();

expectTypeOf(arr.uniqBy('bar')).toEqualTypeOf<NativeArray<Foo>>();
// Doesn't enforce keys
expectTypeOf(arr.uniqBy('missing')).toEqualTypeOf<NativeArray<Foo>>();

expectTypeOf(arr.without(foo)).toEqualTypeOf<NativeArray<Foo>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
  getEach<K extends string>(key: K): NativeArray<Value<T, K>>;
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
expectTypeOf(arr.invoke('hi')).toEqualTypeOf<NativeArray<string>>();
expectTypeOf(arr.invoke('withArgs', 1, 'two')).toEqualTypeOf<NativeArray<string>>();
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho
  mapBy<K extends string>(key: K): NativeArray<Value<T, K>>;
open pull request

chriskrycho wants to merge emberjs/ember.js

chriskrycho
chriskrycho

Future public types for @ember/array

Includes #19910

We should probably consider whether we actually want to make these all fully public. Many of these usages are probably not recommended anymore. That said, if we choose not to make this public, we should still make sure we use the internal improvements from this PR.

chriskrycho
chriskrycho

Two notes:

  • We don't actually need the TT param here at all, we can just
  • the last bit should be an array of T rather than a one-tuple of T, I think? Just by intent, I would be surprised to get back a tuple.
function makeArray<T>(obj: T): T extends Array<unknown> ? T : T extends null | undefined ? [] : T[];
Previous