add type comments to createRedirects doc

This commit is contained in:
slorber 2020-06-03 20:09:56 +02:00
parent e60c063120
commit f6d1b2b9ca

View file

@ -523,10 +523,8 @@ module.exports = {
{ {
redirects: [ redirects: [
{ {
// : string to: '/docs/newDocPath', // string
to: '/docs/newDocPath', from: ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'], // string | string[]
// : string | string[]
from: ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'],
}, },
], ],
}, },
@ -545,7 +543,7 @@ module.exports = {
{ {
createRedirects: function (existingPath) { createRedirects: function (existingPath) {
if (existingPath === '/docs/newDocPath') { if (existingPath === '/docs/newDocPath') {
return ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016']; return ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016']; // string | string[]
} }
}, },
}, },