(id: string)
| 1243 | // Own methods plus every embedded type's, a standard-library one's too. |
| 1244 | const NONE_OPAQUE: ReadonlySet<string> = new Set(); |
| 1245 | const methodNames = (id: string): GoMethodNames => { |
| 1246 | const types = embedClosure(id); |
| 1247 | if (types.length === 1 && !outside.has(id)) return { methods: ownMethods(id), opaque: NONE_OPAQUE }; |
| 1248 | const methods = new Set<string>(); |
| 1249 | const opaque = new Set<string>(); |
| 1250 | for (const t of types) { |
| 1251 | for (const m of ownMethods(t)) methods.add(m); |
| 1252 | const out = outside.get(t); |
| 1253 | if (!out) continue; |
| 1254 | for (const known of out.stdlib) for (const key of known.keys()) methods.add(key); |
| 1255 | for (const type of out.opaque) opaque.add(type); |
| 1256 | } |
| 1257 | return { methods, opaque }; |
| 1258 | }; |
| 1259 | |
| 1260 | const covers = (have: Set<string>, want: Set<string>): boolean => { |
| 1261 | if (have.size < want.size) return false; |
no test coverage detected