(id: string)
| 1179 | // Own methods plus every embedded type's, a standard-library one's too. |
| 1180 | const NONE_OPAQUE: ReadonlySet<string> = new Set(); |
| 1181 | const methodNames = (id: string): GoMethodNames => { |
| 1182 | const types = embedClosure(id); |
| 1183 | if (types.length === 1 && !outside.has(id)) return { methods: ownMethods(id), opaque: NONE_OPAQUE }; |
| 1184 | const methods = new Set<string>(); |
| 1185 | const opaque = new Set<string>(); |
| 1186 | for (const t of types) { |
| 1187 | for (const m of ownMethods(t)) methods.add(m); |
| 1188 | const out = outside.get(t); |
| 1189 | if (!out) continue; |
| 1190 | for (const known of out.stdlib) for (const key of known.keys()) methods.add(key); |
| 1191 | for (const type of out.opaque) opaque.add(type); |
| 1192 | } |
| 1193 | return { methods, opaque }; |
| 1194 | }; |
| 1195 | |
| 1196 | const covers = (have: Set<string>, want: Set<string>): boolean => { |
| 1197 | if (have.size < want.size) return false; |
no test coverage detected