mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
refactor(website): remove unneccessary addPackageToModel function (#9983)
* types: fix links in @deprecated tags * Merge branch 'main' into fix/deprecated-links-d.ts * fix: searchIndices * refactor: apply review suggestions * refactor: remove addPackageToModel function * fix: event links in search index * fix: wrong overload condition
This commit is contained in:
@@ -37,11 +37,6 @@ export const PACKAGES = [
|
||||
];
|
||||
let idx = 0;
|
||||
|
||||
export function addPackageToModel(model: ApiModel, data: any) {
|
||||
model.addMember(ApiPackage.loadFromJson(data));
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to resolve the summary text for the given item.
|
||||
*
|
||||
@@ -164,7 +159,8 @@ export async function generateAllIndices({
|
||||
idx = 0;
|
||||
|
||||
const data = await fetchPackageVersionDocs(pkg, version);
|
||||
const model = addPackageToModel(new ApiModel(), data);
|
||||
const model = new ApiModel();
|
||||
model.addMember(ApiPackage.loadFromJson(data));
|
||||
const members = visitNodes(model.tryGetPackageByName(pkg)!.entryPoints[0]!, version);
|
||||
|
||||
const sanitizePackageName = pkg.replaceAll('.', '-');
|
||||
|
||||
Reference in New Issue
Block a user