Just my personal site for notes. Nothing special.
⏰ Day.js 2KB immutable date library alternative to Moment.js with the same modern API
extension for google chrome that helps you find search field on a site
anzome/gatsby-remark-functions 0
allows to output something complex instead of a parametrized placeholder
rust learning project, personal custom hotkeys for windows migrated from autohotkey
Simple and tiny (101 bytes) event emitter library for JavaScript
Makes async operations over any iterable (in perspective, for now only over arrays) object as simple as the sync ones
most basic template for client web applications
Template repo for creating libraries
Modular typographic framework
push eventmicrosoft/TypeScript
commit sha 0858933dce6cd3bb2cd0973c78a1f61d229dfba9
fix(44637): add spaces between exports assignment equal token (#44655)
push time in 8 minutes
PR merged microsoft/TypeScript
Fixes #44637
pr closed time in 8 minutes
issue closedmicrosoft/TypeScript
TypeScript formatter doesn't format `export=` properly
TypeScript Version: 4.3.3
Search Terms
- format export
Issue Type: <b>Bug</b>
The default VSCode TypeScript formatter formats export='foo' as export ='foo' instead of export = 'foo' (with a space after the =).
The space is not removed by the formatter when added manually.
VS Code version: Code 1.57.0 (b4c1bd0a9b03c749ea011b06c6d2676c8091a70c, 2021-06-09T17:18:42.354Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No
<details> <summary>A/B Experiments</summary>
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt700cf:30270857
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30311713
vspre833:30321513
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158:30321503
vscgsv2:30307504
vscorehov:30309549
vscod805:30301674
binariesv517cf:30312826
</details>
<!-- generated by issue reporter -->
closed time in 8 minutes
Nixinovaissue commentmicrosoft/TypeScript
Destructuring exported array with `require` causes error
Seems like we missed a case in the destructuring logic where we forgot to check whether it's an array or an object?
comment created time in 8 minutes
pull request commentrust-lang/rust
Resolve intra-doc links in summary desc
The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)
<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>
Compiling rustdoc v0.0.0 (/checkout/src/librustdoc)
error[E0061]: this function takes 2 arguments but 1 argument was supplied
--> src/librustdoc/html/markdown/tests.rs:224:22
|
224 | let output = short_markdown_summary(input);
| |
| expected 2 arguments
|
note: function defined here
note: function defined here
--> src/librustdoc/html/markdown.rs:1141:10
|
1141 | crate fn short_markdown_summary(markdown: &str, link_names: &[RenderedLink]) -> String {
error: aborting due to previous error
For more information about this error, try `rustc --explain E0061`.
For more information about this error, try `rustc --explain E0061`.
error: could not compile `rustdoc`
To learn more, run the command again with --verbose.
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rustdoc/Cargo.toml" "-p" "rustdoc:0.0.0" "--" "--quiet"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy
Build completed unsuccessfully in 0:23:01
</details>
comment created time in 9 minutes
issue commentrust-lang/rust
Reduce size of `target` directory
@bugproof cargo has a tracking issue for ways to improve its cache usage https://github.com/rust-lang/cargo/issues/7150 . In the "Reusing shared dependencies" section, it lists a couple options that can be used today.
comment created time in 10 minutes
pull request commentmicrosoft/TypeScript
Indirect calls for imported functions
I guess we started generating a package-lock.json at some point, but its still in our .gitignore. I've restored the version from main.
comment created time in 11 minutes
push eventmicrosoft/TypeScript
commit sha 4e056d39a05cef6585979f0d972cd939dc01e1ec
Fix unit tests
push time in 12 minutes
pull request commentvercel/next.js
fix: blurred image not positioned correctly when using object-position
Thanks for the fix! the two next.config.js files don't need to be in the PR, and this could use integration test coverage.
comment created time in 13 minutes
issue commentmicrosoft/TypeScript
extends the base generics -- as in DeepUnion<A, B> extends A and extends B is true
This sounds more like an intersection than a union. Union types are never directly assignable to any of their constituent types (without narrowing them first).
comment created time in 13 minutes
pull request commentrust-lang/rust
Use Rust Symbol Mangling by default
Finished benchmarking try commit (b10f5179a8c898e8b1c29c7cae49dfc00109fa0b): comparison url.
Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.
Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.
@bors rollup=never @rustbot label: +S-waiting-on-review -S-waiting-on-perf
comment created time in 14 minutes
issue commentmicrosoft/TypeScript
JS ES6 class derived member functions typed with literals don't get assigned the correct type
Why does
Derived#testget widened, though?
If you have a hierarchy like this
class Base {
getClassName() {
return "base";
}
}
class Derived extends Base {
getClassName() {
return "derived";
}
}
The intent of this code is very clear -- it's not a subtyping violation, because the implied contract of Base#getClassName is to return some opaque string. So when a function only returns a single string, we widen it to its base primitive type.
comment created time in 15 minutes
issue commentvercel/next.js
TypeError: Cannot read property 'theme' of undefined
I got the same error starting today. Yesterday it was fine somehow.
I don't have with-tailwindcss-emotion though. I'm on tailwindcss 2.2.2.
postcss-loader/cjs.js??ruleSet[1].rules[2].oneOf[2].use[2]!./components/widgets/monolith404.module.css TypeError: Cannot read property 'theme' of undefined
comment created time in 16 minutes
pull request commentrust-lang/rust
FWIW, I can run that docker image here and it gets the beta rev just fine. More ideas to look at in CI:
pwd/std::env::current_dir()git rev-parse --git-dirgit rev-parse --show-toplevelgit branch --remote
comment created time in 18 minutes
PR closed microsoft/TypeScript
Investigating improving performance of #35877
Related #43486
pr closed time in 20 minutes
push eventmicrosoft/TypeScript
commit sha 143e4a184f44752a4ffda59c07944054c898c1a5
Fix unit tests
push time in 22 minutes
push eventmicrosoft/TypeScript
commit sha f9f719a3fdf1eba66511c3d9deb18eb3440949b4
Fix unit tests
push time in 23 minutes
pull request commentmicrosoft/TypeScript
Indirect calls for imported functions
package-lock existing is surprising. I thought we had an .npmrc that disabled package-lock.
comment created time in 24 minutes
push eventmicrosoft/TypeScript
commit sha 6e4b7308a37354ea1e99db383d5c9d9e84238147
fix(44465): remove only unused declarations instead of the entire line (#44490)
push time in 25 minutes
PR merged microsoft/TypeScript
Fixes #44465
pr closed time in 25 minutes
issue closedmicrosoft/TypeScript
Remove unused declaration code fix will remove preceeding statements on same line
Bug Report
export const a = 1; const c = 2
- Do action "Remove unused declaration for: 'c'"
End result:
🔎 Search Terms
unused identifier code fix same line
🕗 Version & Regression Information
- This occurs in 4.4.0-dev.20210606
- Did not occur in 3.8.3
- Started occuring in 3.9.7 (i'm just looking at the playground so didn't get exact version)
⏯ Playground Link
https://www.typescriptlang.org/play?ts=4.4.0-dev.20210606#code/KYDwDg9gTgLgBAYwgOwM7wIZwLxwIwDciK6iOcATEA
🙁 Actual behavior
🙂 Expected behavior
export const a = 1;
closed time in 25 minutes
dsherretissue closedmicrosoft/TypeScript
Second order inference after sub-property merge is including impossible type values
Bug Report
<!-- Please fill in each section completely. Thank you! -->
🔎 Search Terms
<!-- What search terms did you use when trying to find an existing bug report? List them here so people in the future can find this one more easily. -->
subproperty merge, inference, "typsecript adding {} on keyof T"
🕗 Version & Regression Information
4.3.2
⏯ Playground Link
<!-- A link to a TypeScript Playground "Share" link which shows this behavior
The TypeScript Workbench can be used for more complex setups, try https://www.typescriptlang.org/dev/bug-workbench/
As a last resort, you can link to a repo, but these will be slower for us to investigate. --> Playground link with relevant code
💻 Code
<!-- Please post the relevant code sample here as well-->
export type SubpropertyMerge<T> = (
T extends (...args: infer A) => infer R ? (
(...args: A) => R
): (
T extends object ? { [K in keyof T]: SubpropertyMerge<T[K]> } : T
)
);
type ConfHolder<CONF> = {
conf: CONF;
}
type InferConf<T> = T extends ConfHolder<infer C> ? C : never;
type CombineConf<
HOLDER extends ConfHolder<any>,
CONF extends object,
> = SubpropertyMerge<InferConf<HOLDER> & CONF>;
type DefaultValueType = "foo" | "bar";
type SpecialValueType = { special: string };
type ValueType = { valueType: DefaultValueType | SpecialValueType};
const Conf1: ConfHolder<ValueType> = null as any;
const foo: ConfHolder<CombineConf<typeof Conf1, ValueType>> = null as any;
foo.conf.valueType; // correct type
const bar: CombineConf<typeof foo, ValueType> = null as any;
bar.valueType; // has a bunch of {} additions
🙁 Actual behavior

bar.valueType is:
(property) valueType: "foo" | "bar" | {} | {} | {} | {} | { special: string; }
🙂 Expected behavior
<!-- What you expected to happen instead, and why -->
bar.valueType should be:
(property) valueType: "foo" | "bar" | { special: string; }
{} is not a valid type for bar.valueType
I suspect this an issue with SubpropertyMerge, but I can't see any reason why it would be happening.
🔎 Clues
- if you update
type ValueType = { valueType: DefaultValueType | SpecialValueType};to betype ValueType = { valueType: DefaultValueType };, it works fine
- something about the possible object type is creating an empty object
- how can subpropertymerge only do
{[K in keyof T]: ...}whenkeyof T> 0?
- if you hover
typeof foois gives a very correct value of:const foo: ConfHolder<{ valueType: DefaultValueType | { special: string; }; }>
closed time in 25 minutes
SephReedissue commentmicrosoft/TypeScript
Second order inference after sub-property merge is including impossible type values
Alright, after a boat-load of work, I got something working.
Relevant changes:
export type DeepMerge<T1, T2> = (
T1 extends object ? (
T2 extends object ? (
MergeToOne<(
{ [K in (keyof T2 & keyof T1 & RequiredKeys<T1 | T2>)]: DeepMerge<T1[K], T2[K]> }
& { [K in (keyof T2 & keyof T1 & OptionalKeys<T1 | T2>)]?: DeepMerge<T1[K], T2[K]> }
& { [K in Exclude<RequiredKeys<T1>, keyof T2>]: T1[K] }
& { [K in Exclude<OptionalKeys<T1>, keyof T2>]?: T1[K] }
& { [K in Exclude<RequiredKeys<T2>, keyof T1>]: T2[K] }
& { [K in Exclude<OptionalKeys<T2>, keyof T1>]?: T2[K] }
)>
) : (
T1 extends object ? T2 : T1 | T2
)
) : (
T2 extends object ? T1 : T1 | T2
)
);
type MergeToOne<T> = (
T extends object ? { [K in keyof T]: (
K extends RequiredKeys<T> ? Exclude<T[K], undefined> : T[K]
)} : never
)
type RequiredKeys<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? never : K }[keyof T];
type OptionalKeys<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? K : never }[keyof T];
It still has all sorts of short-comings (notably, it's extremely laggy when layered).
As such, I've put in a Feature Request #44660 for a built in DeepMerge type, such that it'll do what (seemingly) can't be done otherwise
comment created time in 25 minutes
pull request commentmicrosoft/TypeScript
Index signatures for symbols and template literal strings
@weswigham @RyanCavanaugh Latest commits address code review feedback.
comment created time in 27 minutes
push eventrust-lang/rust
commit sha e76929ff981cd50e6a4d4936bf1f89ed625b032a
Add has_data_left() to BufRead
commit sha 99939c44c3fabbd4bfcb87839072ba563ce12d9b
Update tracking issue
commit sha ce1d5611a28468663e275078649e7ca6eef735a8
Auto merge of #85815 - YuhanLiin:buf-read-data-left, r=m-ou-se Add has_data_left() to BufRead This is a continuation of #40747 and also addresses #40745. The problem with the previous PR was that it had "eof" in its method name. This PR uses a more descriptive method name, but I'm open to changing it.
push time in 28 minutes
PR merged rust-lang/rust
This is a continuation of #40747 and also addresses #40745. The problem with the previous PR was that it had "eof" in its method name. This PR uses a more descriptive method name, but I'm open to changing it.
pr closed time in 28 minutes
pull request commentrust-lang/rust
make UB during CTFE a hard error
:hourglass: Testing commit 7475661678359a081f8a66cd35f3b3993cf788ba with merge ec57c60c50de4f601a5dbe80e663388058e6e527... <!-- homu: {"type":"BuildStarted","head_sha":"7475661678359a081f8a66cd35f3b3993cf788ba","merge_sha":"ec57c60c50de4f601a5dbe80e663388058e6e527"} -->
comment created time in 28 minutes
pull request commentrust-lang/rust
Add has_data_left() to BufRead
:sunny: Test successful - checks-actions Approved by: m-ou-se Pushing ce1d5611a28468663e275078649e7ca6eef735a8 to master... <!-- homu: {"type":"BuildCompleted","approved_by":"m-ou-se","base_ref":"master","builders":{"checks-actions":"https://github.com/rust-lang-ci/rust/runs/2862421348"},"merge_sha":"ce1d5611a28468663e275078649e7ca6eef735a8"} -->
comment created time in 28 minutes
push eventmicrosoft/TypeScript
commit sha 971133d5d0a56cf362571d21ac971888f8a66820
New command line help developer experience. (#44157) * refactor help CLI output. * fix typo and omit false condition boolean output. * fix typo * add line break * add --plugins option to basic option category. * add ts icon and remove old print help function. * better command description for --jsx. * Fix test * fix lint * Improvements to the UX * Fix tests * fix test. * add missing help out. * use environemnt variable to control test case. * fix merge issues. * No `No Category` * make getWidthOfTerminal optional. * fix test * fix review. * fix review. * Update baselines Co-authored-by: Orta <[email protected]>
commit sha d0159a88914f0639230741b2a5176f012bc0b8bb
Fix late bound method name assignment, added tests (#43344) * Fix late bound method name assignment, added tests * Refactor bindDynamicallyNamedthisPropertyAssignment * PR comments * Rollback allowJscheck fix
commit sha a3eadfe905dc3ba140e4214b6b14a52144747065
Skip base type checks that can cause circularities (#44615) * Don't do base type checks that can cause circularities * Add regression tests
commit sha 4af8333a4e371eb8069c2e1534346ddc207bd3f5
support JSDoc comments inherited for parameter properties (#44329) * support JSDoc comments inherited for parameter properties * Update formats Co-authored-by: Nathan Shively-Sanders <[email protected]> Co-authored-by: Nathan Shively-Sanders <[email protected]>
commit sha 97b4063d73d479053ba98e7f12744b46db04cfd8
Don't attach declarations to symbols in mapped types with 'as XXX' clauses (#44609) * Don't attach declarations to symbols in mapped types with 'as XXX' clauses * Add test (and tweak comment) Co-authored-by: Eli Barzilay <[email protected]>
commit sha d46d82c9bda7411690fd864a35d3e44e1c90ea13
Slightly more conservative check in isConstraintPosition function (#44621) * Slightly more conservative check in isConstraintPosition function * Update comment * Add tests
commit sha 8dbb2cd5fbe03cf50a7d01a7ee060c2948a3d3cb
allow `this` in typeQuery (#43898) * allow `this` in typeQuery * add tests * get this type as expression * handle nested nodes * update baselines
commit sha 9549928ce9184f5c53c61c0d18d9fbae12308f0f
Make export-module and reference maps invertible (#44402) * Make export-module and reference maps invertible Right now, we're enumerating all the entries to find out which keys map to a corresponding value. By maintaining a two-way map, we can convert this linear search into a map lookup and skip allocation of many, many iterator results. * Fix lint error * Add some explanatory comments * Rename, drop type parameters, and add readonly variant * Simplify member list * Fold non-exporting behavior into custom map type
commit sha eee34d539c340b4436f993aa9e0c84e24ef298e1
feat(28491): add QF to declare missing properties (#44576)
commit sha fad9122872a4df92050177edb07ee9cf3efd7e35
`services/utilities/getMeaningFromLocation()`: fix w/ export specifiers Fixes 44167, but also two other things: * On an import/export, climb upto the declaration, and use `SemanticMeaning.Type` if it's a `type` only import/export. * Add a `test.rangesInFile()` to fourslash, so it is easy to do multiple files in one test without an awkward filter (which was done in one more test).
commit sha 5afe42e14e61d7e4df5d75cc0022283711cb593a
Rename strictOptionalProperties -> exactOptionalPropertyTypes and remove from strict family (#44626)
commit sha 580bb066c1d5abdcafb0f09c1477b914defc0ac8
Make files safe for Windows (#44651) * make typeofthis tests case-insensitive-safe * shorten test case names * correct way to change test directories * update baselines
commit sha 0f216f36ec554da78793bd73a5294116000f6b57
Forbid duplicates in baselines (#44652) * Forbid duplicates in baselines The check is case insensitive. * Update baselines and add semi-colons Gotta have those semicolons.
commit sha 8d3125b78a31b884c24dfce81f068206b4d11b6d
Allows plugin to register commands (#44291) * Pass session into plugin * Use unknown message type * Add missing unknown * use editor services insted of every project * Fix baseline * Add plugin test * Avoid type parameter * Accept baseline
commit sha f850470d18019c1986b2f48dea07d38a81d1d02d
fix(44377): omit type alias declarations from JavaScript (#44378)
commit sha bf633d8861e6e638d8437d5fa61dc88585158f25
Symbol index signatures from object literals with computed symbol properties
commit sha 5baae83fc3e7ea591deaa0a7e514307ceeb9fb58
Accept new baselines
commit sha 2f4c9672e93f7d72387a7fa0d2c0c7e2f74bd3f9
Add more tests
commit sha f3897c1b4ead828263305ac74cbd6e46812e2009
Accept new baselines
commit sha ef47fa174e50e30820c8262a715d2e401575e685
Merge branch 'main' into moreIndexSignatures # Conflicts: # tests/baselines/reference/variadicTuples1.errors.txt
push time in 28 minutes