You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: __tests__/api-writer/glua-api-writer.spec.ts
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,7 @@ describe('GLua API Writer', () => {
123
123
],
124
124
});
125
125
126
-
expect(api).toEqual(`--- Explodes with an optional intensity.\n---\n---[(View on wiki)](na)\n---@param intensity? number The intensity of the explosion.\n---@return number # The amount of damage done.\nfunction _G.Explode(intensity) end\n\n`);
126
+
expect(api).toEqual(`--- Explodes with an optional intensity.\n---\n---[View wiki](na)\n---@param intensity? number The intensity of the explosion.\n---@return number # The amount of damage done.\nfunction _G.Explode(intensity) end\n\n`);
127
127
});
128
128
129
129
it('should allow overriding specific page addresses',()=>{
@@ -246,7 +246,7 @@ describe('GLua API Writer', () => {
246
246
],
247
247
});
248
248
249
-
expect(api).toEqual(`--- Returns a table of all bots on the server.\n---\n---[(View on wiki)](na)\n---@return Player[] # A table only containing bots ( AI / non human players )\nfunction player.GetBots() end\n\n`);
249
+
expect(api).toEqual(`--- Returns a table of all bots on the server.\n---\n---[View wiki](na)\n---@return Player[] # A table only containing bots ( AI / non human players )\nfunction player.GetBots() end\n\n`);
250
250
});
251
251
252
252
it('should not convert table<type,otherType> to type,otherType[]',()=>{
@@ -268,7 +268,7 @@ describe('GLua API Writer', () => {
268
268
],
269
269
});
270
270
271
-
expect(api).toEqual(`--- Returns a table of all bots on the server.\n---\n---[(View on wiki)](na)\n---@return table<number,Player> # A table only containing bots ( AI / non human players )\nfunction player.GetBots() end\n\n`);
271
+
expect(api).toEqual(`--- Returns a table of all bots on the server.\n---\n---[View wiki](na)\n---@return table<number,Player> # A table only containing bots ( AI / non human players )\nfunction player.GetBots() end\n\n`);
272
272
});
273
273
274
274
consttestFuncPart={
@@ -298,7 +298,7 @@ describe('GLua API Writer', () => {
298
298
}
299
299
],
300
300
},
301
-
output: `--- Just for testing.\n---\n---[(View on wiki)](na)\n---@param value string|number The value to fake.\nfunction test.Fake(value) end\n\n`,
301
+
output: `--- Just for testing.\n---\n---[View wiki](na)\n---@param value string|number The value to fake.\nfunction test.Fake(value) end\n\n`,
302
302
},
303
303
// Case with pipes in the type (prefered in wiki)
304
304
{
@@ -314,7 +314,7 @@ describe('GLua API Writer', () => {
314
314
}
315
315
],
316
316
},
317
-
output: `--- Just for testing.\n---\n---[(View on wiki)](na)\n---@param value string|number The value to fake.\nfunction test.Fake(value) end\n\n`,
317
+
output: `--- Just for testing.\n---\n---[View wiki](na)\n---@param value string|number The value to fake.\nfunction test.Fake(value) end\n\n`,
318
318
},
319
319
// Case with pipes and table<x> conversion
320
320
{
@@ -330,7 +330,7 @@ describe('GLua API Writer', () => {
330
330
}
331
331
],
332
332
},
333
-
output: `--- Just for testing.\n---\n---[(View on wiki)](na)\n---@param value string|table<number,Player> The value to fake.\nfunction test.Fake(value) end\n\n`,
333
+
output: `--- Just for testing.\n---\n---[View wiki](na)\n---@param value string|table<number,Player> The value to fake.\nfunction test.Fake(value) end\n\n`,
334
334
},
335
335
// Case with table<x> conversion in both altType and type
336
336
{
@@ -347,7 +347,7 @@ describe('GLua API Writer', () => {
347
347
}
348
348
],
349
349
},
350
-
output: `--- Just for testing.\n---\n---[(View on wiki)](na)\n---@param value table<number,Player>|table<Entity,number> The value to fake.\nfunction test.Fake(value) end\n\n`,
350
+
output: `--- Just for testing.\n---\n---[View wiki](na)\n---@param value table<number,Player>|table<Entity,number> The value to fake.\nfunction test.Fake(value) end\n\n`,
@@ -372,7 +372,7 @@ describe('GLua API Writer', () => {
372
372
],
373
373
});
374
374
375
-
expect(api).toEqual(`--- Just for testing.\n---\n---[(View on wiki)](na)\n---@param value table<string|number>|string The value to fake.\nfunction test.Fake(value) end\n\n`);
375
+
expect(api).toEqual(`--- Just for testing.\n---\n---[View wiki](na)\n---@param value table<string|number>|string The value to fake.\nfunction test.Fake(value) end\n\n`);
376
376
});
377
377
378
378
it('should support structure table type',()=>{
@@ -394,7 +394,7 @@ describe('GLua API Writer', () => {
394
394
],
395
395
});
396
396
397
-
expect(api).toEqual(`--- Returns where on the screen the specified position vector would appear.\n---\n---[(View on wiki)](na)\n---@return ToScreenData # The created Structures/ToScreenData.\nfunction Vector.ToScreen() end\n\n`);
397
+
expect(api).toEqual(`--- Returns where on the screen the specified position vector would appear.\n---\n---[View wiki](na)\n---@return ToScreenData # The created Structures/ToScreenData.\nfunction Vector.ToScreen() end\n\n`);
398
398
});
399
399
400
400
// number{ENUM_NAME} -> ENUM_NAME
@@ -420,7 +420,7 @@ describe('GLua API Writer', () => {
420
420
],
421
421
});
422
422
423
-
expect(api).toEqual(`--- Sets the fog mode.\n---\n---[(View on wiki)](na)\n---@param mode MATERIAL_FOG The fog mode.\nfunction render.FogMode(mode) end\n\n`);
423
+
expect(api).toEqual(`--- Sets the fog mode.\n---\n---[View wiki](na)\n---@param mode MATERIAL_FOG The fog mode.\nfunction render.FogMode(mode) end\n\n`);
424
424
});
425
425
426
426
// it('should be able to write Annotated API files directly from wiki pages', async () => {
Copy file name to clipboardExpand all lines: __tests__/test-data/offline-sites/gmod-wiki/library-function-concommand-gettable.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ concommand = {}
15
15
16
16
--- Returns the tables of all console command callbacks, and autocomplete functions, that were added to the game with [concommand.Add](https://wiki.facepunch.com/gmod/concommand.Add).
17
17
---
18
-
---[(View on wiki)](https://wiki.facepunch.com/gmod/concommand.GetTable)
Copy file name to clipboardExpand all lines: __tests__/test-data/offline-sites/gmod-wiki/library-function-coroutine-resume.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ coroutine = {}
17
17
18
18
--- Resumes the given coroutine and passes the given vararg to either the function arguments or the [coroutine.yield](https://wiki.facepunch.com/gmod/coroutine.yield) that is inside that function and returns whatever yield is called with the next time or by the final return in the function.
19
19
---
20
-
---[(View on wiki)](https://wiki.facepunch.com/gmod/coroutine.resume)
Copy file name to clipboardExpand all lines: custom/spawnmenu.AddCreationTab.lua
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
--- Inserts a new tab into the CreationMenus table, which will be used by the creation menu to generate its tabs (Spawnlists, Weapons, Entities, etc.)
2
2
---
3
-
---[(View on wiki)](https://wiki.facepunch.com/gmod/spawnmenu.AddCreationTab)
0 commit comments