All layer are not crated equal. some layer like adjustment have no bounds. Smart object layer may have two different sizes. The size of the object and the size the object may be transformed to. All smart object layers have an associated transform. To transform a smart object layers you must work with the object size the pixels generated fot the layer. Text layer can be resized with a transform or by changing the font size. Raster layers are resize via a transform. The scripting method is resize. When you resize the number of pixelsits done via interpolation. You can specify what method to use or set Photoshop preference default interpolation.
There is also a bug in Photoshop scripting if you suspend history stated make a selection and use resize. Photoshop will incorrectly back up to one state prior to where you suspended history. This bug seen to be in all versions of Photoshop.
If you look ate the script in my bug report you should get a good idea of how to resize a layer.