MCPcopy
hub / github.com/prettier/prettier / Static

Class Static

tests/format/flow/flow-repo/private_class_fields/test.js:81–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81class Static {
82 static #p: number
83 static #q: number
84 #r: number
85 m(): number {
86 Static.#p = 2;
87 if (Static.#p === 3) { // Refinements still work
88 (Static.#p : 3);
89 }
90 return Static.#p;
91 }
92 bad() {
93 IncompatibleGetAndSet.#q; // Error, not visible here
94 Static.#q = Static.#p;
95 this.#p = 3; // Error, no #p on instance
96 this.#q; // Error, no #q on instance
97 Static.#r; // Error, no #r on class
98 Static.#r = Static.#q; // Error, no #r on class
99 }
100}
101
102class Annotations {
103 // Private class fields must either be annotated or have an initializer

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…