profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/anzome/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Alexander Zonov anzome plexie.com Russia, Kirov anzo.me web and stuff

anzome/anzo.me 0

Just my personal site for notes. Nothing special.

anzome/dayjs 0

⏰ Day.js 2KB immutable date library alternative to Moment.js with the same modern API

anzome/find-search 0

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

anzome/hotkeys 0

rust learning project, personal custom hotkeys for windows migrated from autohotkey

anzome/nanoevents 0

Simple and tiny (101 bytes) event emitter library for JavaScript

anzome/syncope 0

Makes async operations over any iterable (in perspective, for now only over arrays) object as simple as the sync ones

anzome/template-js-client 0

most basic template for client web applications

anzome/template-js-lib 0

Template repo for creating libraries

anzome/textr 0

Modular typographic framework

push eventmicrosoft/TypeScript

Oleksandr T

commit sha 0858933dce6cd3bb2cd0973c78a1f61d229dfba9

fix(44637): add spaces between exports assignment equal token (#44655)

view details

push time in 8 minutes

PR merged microsoft/TypeScript

fix(44637): TypeScript formatter doesn't format export= properly For Backlog Bug

Fixes #44637

+9 -0

0 comment

2 changed files

a-tarasyuk

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

Nixinova

issue 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?

lumaxis

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>

notriddle

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.

Diggsey

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.

rbuckton

comment created time in 11 minutes

push eventmicrosoft/TypeScript

Ron Buckton

commit sha 4e056d39a05cef6585979f0d972cd939dc01e1ec

Fix unit tests

view details

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.

DarkCode01

comment created time in 13 minutes

issue commentmicrosoft/TypeScript

Deep Union Utility Types

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).

SephReed

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

tmiasko

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#test get 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.

Paril

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

phoshenwen

comment created time in 16 minutes

pull request commentrust-lang/rust

[beta] Bootstrap from stable

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-dir
  • git rev-parse --show-toplevel
  • git branch --remote
Mark-Simulacrum

comment created time in 18 minutes

delete branch microsoft/TypeScript

delete branch : reusableZeroLiteral

delete time in 20 minutes

PR closed microsoft/TypeScript

Add a reusable '0' literal for the module transform Author: Team For Uncommitted Bug

Investigating improving performance of #35877

Related #43486

+39 -42

17 comments

1 changed file

rbuckton

pr closed time in 20 minutes

push eventmicrosoft/TypeScript

Ron Buckton

commit sha 143e4a184f44752a4ffda59c07944054c898c1a5

Fix unit tests

view details

push time in 22 minutes

push eventmicrosoft/TypeScript

Ron Buckton

commit sha f9f719a3fdf1eba66511c3d9deb18eb3440949b4

Fix unit tests

view details

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.

rbuckton

comment created time in 24 minutes

push eventmicrosoft/TypeScript

Oleksandr T

commit sha 6e4b7308a37354ea1e99db383d5c9d9e84238147

fix(44465): remove only unused declarations instead of the entire line (#44490)

view details

push 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
  1. 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

dsherret

issue 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

Screen Shot 2021-06-18 at 1 00 53 PM Screen Shot 2021-06-18 at 1 01 17 PM

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

  1. if you update type ValueType = { valueType: DefaultValueType | SpecialValueType}; to be type 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]: ...} when keyof T > 0?
  1. if you hover typeof foo is gives a very correct value of:
      const foo: ConfHolder<{
       valueType: DefaultValueType | {
          special: string;
       };
     }>
    
    

closed time in 25 minutes

SephReed

issue 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.

TS Playground Link

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

SephReed

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.

ahejlsberg

comment created time in 27 minutes

push eventrust-lang/rust

YuhanLiin

commit sha e76929ff981cd50e6a4d4936bf1f89ed625b032a

Add has_data_left() to BufRead

view details

YuhanLiin

commit sha 99939c44c3fabbd4bfcb87839072ba563ce12d9b

Update tracking issue

view details

bors

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.

view details

push time in 28 minutes

PR merged rust-lang/rust

Add has_data_left() to BufRead S-waiting-on-bors T-libs-api merged-by-bors

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.

+41 -0

5 comments

2 changed files

YuhanLiin

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"} -->

RalfJung

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"} -->

YuhanLiin

comment created time in 28 minutes

push eventmicrosoft/TypeScript

Song Gao

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 <git@orta.io>

view details

Armando Aguirre

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

view details

Anders Hejlsberg

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

view details

Zzzen

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 <293473+sandersn@users.noreply.github.com> Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

view details

Anders Hejlsberg

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 <eli@barzilay.org>

view details

Anders Hejlsberg

commit sha d46d82c9bda7411690fd864a35d3e44e1c90ea13

Slightly more conservative check in isConstraintPosition function (#44621) * Slightly more conservative check in isConstraintPosition function * Update comment * Add tests

view details

Zzzen

commit sha 8dbb2cd5fbe03cf50a7d01a7ee060c2948a3d3cb

allow `this` in typeQuery (#43898) * allow `this` in typeQuery * add tests * get this type as expression * handle nested nodes * update baselines

view details

Andrew Casey

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

view details

Oleksandr T

commit sha eee34d539c340b4436f993aa9e0c84e24ef298e1

feat(28491): add QF to declare missing properties (#44576)

view details

Eli Barzilay

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).

view details

Ryan Cavanaugh

commit sha 5afe42e14e61d7e4df5d75cc0022283711cb593a

Rename strictOptionalProperties -> exactOptionalPropertyTypes and remove from strict family (#44626)

view details

Nathan Shively-Sanders

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

view details

Nathan Shively-Sanders

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.

view details

Wenlu Wang

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

view details

Oleksandr T

commit sha f850470d18019c1986b2f48dea07d38a81d1d02d

fix(44377): omit type alias declarations from JavaScript (#44378)

view details

Anders Hejlsberg

commit sha bf633d8861e6e638d8437d5fa61dc88585158f25

Symbol index signatures from object literals with computed symbol properties

view details

Anders Hejlsberg

commit sha 5baae83fc3e7ea591deaa0a7e514307ceeb9fb58

Accept new baselines

view details

Anders Hejlsberg

commit sha 2f4c9672e93f7d72387a7fa0d2c0c7e2f74bd3f9

Add more tests

view details

Anders Hejlsberg

commit sha f3897c1b4ead828263305ac74cbd6e46812e2009

Accept new baselines

view details

Anders Hejlsberg

commit sha ef47fa174e50e30820c8262a715d2e401575e685

Merge branch 'main' into moreIndexSignatures # Conflicts: # tests/baselines/reference/variadicTuples1.errors.txt

view details

push time in 28 minutes